Skip to content

Commit

Permalink
Fixed Some of #36
Browse files Browse the repository at this point in the history
It still crashes but fixed some part of it.
  • Loading branch information
XDPXI committed Nov 16, 2024
1 parent 0c5c956 commit 4d53066
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/dev/xdpxi/xdlib/api/mod/custom.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public static Item Item(String itemID, String modID, RegistryKey<ItemGroup> item
modID = modID.toLowerCase();
Identifier identifier = Identifier.of(modID, itemID);

Item item = new Item(new Item.Settings());
Item.Settings settings = new Item.Settings();
Item item = new Item(settings);
Registry.register(Registries.ITEM, identifier, item);

if (itemGroup != null) {
Expand Down Expand Up @@ -88,7 +89,8 @@ public static Item Weapon(String weaponID, String modID, ToolMaterial material,
modID = modID.toLowerCase();
Identifier identifier = Identifier.of(modID, weaponID);

SwordItem weapon = new SwordItem(material, new Item.Settings().maxDamage(material.getDurability()));
SwordItem weapon = new SwordItem(material, new Item.Settings()
.maxDamage(material.getDurability()));
Registry.register(Registries.ITEM, identifier, weapon);

if (itemGroup != null) {
Expand Down

0 comments on commit 4d53066

Please sign in to comment.