Private
constructorReturns the current damage level of this particular item.
This property can't be edited in read-only mode.
Readonly
maxRepresents the amount of damage that this item can take before breaking.
This property can throw when used.
Readonly
typeIdentifier of the component.
Static
Readonly
componentOptional
unbreakingEnchantmentLevel: numberUnbreaking factor to consider in factoring the damage chance. Incoming unbreaking parameter must be within the range [0, 3].
Optional
Returns the maximum chance that this item would be damaged using the damageRange property, given an unbreaking enchantment level.
This function can't be called in read-only mode.
This function can throw errors.
A range of numbers that is used to calculate the damage chance for an item. The damage chance will fall within this range.
This function can't be called in read-only mode.
This function can throw errors.
When present on an item, this item can take damage in the process of being used. Note that this component only applies to data-driven items.
Example
getItemDurability.js