You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which worked correctly without lwjgl3ify, the durability of my Glass Tool with ToolMaterial glass had 20K Durability and my Glass Weapon with ToolMaterial custom_glass had 32K durability.
However, in Java 17 with lwjgl3ify, because both ToolMaterials were named "GLASS" all the glass items had 20K durability instead of having their specific 20K or 32K durability. I was easily able to resolve this by changing the EnumHelper.addToolMaterial("GLASS" to EnumHelper.addToolMaterial("UNIQUE_GLASS", but I'm not sure if this bug will show up in many other mods that do this type of naming, or if names end up overlapping at all.
The item named Blue Longsword should have 32000 durability and in version 5.1 with lwjgl3ify will have 1200 the same durability as BLUE_STEEL material.
The text was updated successfully, but these errors were encountered:
KAMKEEL
changed the title
Can't have a Tool Material with the same name | Plugin Mod used an example
Can't have a Tool Material with the same name
Feb 6, 2024
Just ran my client in Singleplayer with EXACT same configs and EXACT mods.
Only difference was
lwjgl3ify
andJava 17
My PluginMod registered Tool Materials like this:
Which worked correctly without
lwjgl3ify
, the durability of my Glass Tool with ToolMaterialglass
had 20K Durability and my Glass Weapon with ToolMaterialcustom_glass
had 32K durability.However, in Java 17 with
lwjgl3ify
, because bothToolMaterials
were named"GLASS"
all the glass items had 20K durability instead of having their specific 20K or 32K durability. I was easily able to resolve this by changing theEnumHelper.addToolMaterial("GLASS"
toEnumHelper.addToolMaterial("UNIQUE_GLASS"
, but I'm not sure if this bug will show up in many other mods that do this type of naming, or if names end up overlapping at all.You can replicate it yourself:
Commit that resolved in my mod commit
The item named
Blue Longsword
should have32000
durability and in version5.1
withlwjgl3ify
will have1200
the same durability asBLUE_STEEL
material.The text was updated successfully, but these errors were encountered: