Page 1 of 1

Calculate used durability of tool?

Posted: Tue Nov 15, 2016 2:31 pm
by gheift
Hello,

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 testing, the iron-axe looses 50 durability.

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
Thanks,
Gerhard

Re: Calculate used durability of tool?

Posted: Mon Nov 28, 2016 5:14 pm
by Ranakastrasz
Test it with bobs mod axes or expanded tools. Or mod the tool stats until you confirm or deny your theory. The add to wiki.