-
Notifications
You must be signed in to change notification settings - Fork 20
Description
I got a Bug Report from a User which is using my Plugin - attrib/RepairRecipe#29
I tried to investigate it further and discovered that on a Material of a custom item added by Metallurgy the getMaxDurability is always 0. So somewhere on the Item creation there is going something wrong.
I looked through the code of Metallurgy, but I'm not sure where the Problem is.
In metallurgy/core/metalsets/OreInfo.java:
toolDura = config.get(name + ".Tool Info", "Durability", toolDura).getInt();
The config file is there and there is a value in the config.
Otherwise I think the problem is here:
EnumToolMaterial toolEnum = EnumHelper.addToolMaterial(name, pickLvl,
toolDura, toolSpeed, toolDamage, toolEnchant);
As this comes from Forge there is a possibility the durability is not set in the Enum correctley. Minecraft is calling a method on this enum to retriev the max durabillity.
If you want to reproduce it just the Material of a Item and call getMaxDurability. Best to test is hooking into the CraftItem Event (at least in Bukkit, I have no clue about Forge...)