#Damage item with respect for Unbreaking enchantment

1 messages · Page 1 of 1 (latest)

snow spindle
#

I have a custom item with carrot on a stick as its placeholder. I want to artificially damage it with respect to unbreaking enchantments applied

subtle junco
#

what do you mean

#

oh

#

Just calculate probability

snow spindle
snow spindle
#

probability of what

subtle junco
#

Whether the item will be damaged

snow spindle
#

thats not what unbreaking enchantment does

subtle junco
#

unbreaking cancels durability loss with a chance

snow spindle
#

isnt the durability just tripled

subtle junco
#

no

#

what

snow spindle
#

like 3 uses to remove 1 dura

#

wrong page

subtle junco
#

The average lifetime for an item is (level+1) times long. The unbreaking enchantment adds a (100/(level+1))% chance to reduce durability.
For armor, the chance is (60+(40/level+1))% – resulting in a 25%/35%/43% longer lifetime.

snow spindle
#

oh i get it

subtle junco
#

you can check the level of unbreaking on the stick

snow spindle
#

so i have to add a check for the enchantment

#

yea

subtle junco
#

unless its already a static amount

#

yeah

snow spindle
#

thx

subtle junco
#

thats in skripthub somewhere