Finding and modifying durability calculations
Dragon911XX opened this issue ยท 1 comments
I want to know the base calculations for the tools (all of them), where to find them in the code, so I can modify them for a pack.
For example, I know Pickaxe durability is
((Head durability + binding durability) * rod multiplier) + rod durability
Googling has resulted in nothing, and I'm not sure where to look in the code for this. Thanks!
They're calculated in the corresponding tools classes (Pickaxe, Hammer,...), when building the NBT data. Part of the calculation is done implicitly by the NBT abstraction. Those parts are uniform across all tools, but how they're applied differs. You cannot modify how they're calculated.