Private
constructorThis property can't be edited in read-only mode.
This property can't be read in early-execution mode.
Readonly
isReturns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.
This property can't be read in early-execution mode.
Readonly
maxThis property can't be read in early-execution mode.
Readonly
typeThis property can't be read in early-execution mode.
Beta
unbreakableWhether an item breaks or loses durability. Setting to true temporarily removes item's durabilty HUD, and freezes durability loss on item.
This property can't be edited in read-only mode.
This property can't be read in early-execution mode.
Static
Readonly
componentOptional
unbreakingEnchantmentLevel: numberUnbreaking factor to consider in factoring the damage chance. Incoming unbreaking parameter must be within the range [0, 3]. Defaults to: 0
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't be called in early-execution mode.
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't be called in early-execution mode.
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: giveHurtDiamondSword.ts
Example: getItemDurability.js