is there a way to calculate the consumed durability of e.g. the iron-axe for mining an entity?
A tree has health of 50, hardness of 0.5 and a mining time of 2, the iron-axe has a power of 2.5, needs
Code: Select all
mining_time / (.01 * (power - hardness) = 100 ticks
By using a steel-axe with the power of 4, it needs ~ 58 ticks.
By testing, the steel-axe looses 29 durability.
Do I only have to multiply the used time with the hardness of the item to get the consumed durability?
Code: Select all
durability = math.ceil(mining_time / (.01 * (power - hardness))) * hardness
Gerhard