Returns the current damage level of this particular item.
This property can't be edited in read-only mode.
ReadonlyBetaisValid
isValid:boolean
Remarks
Returns 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.
ReadonlyBetamaxDurability
maxDurability:number
Remarks
Represents the amount of damage that this item can take
before breaking.
Throws
This property can throw when used.
ReadonlyBetatypeId
typeId:string
Remarks
Identifier of the component.
Betaunbreakable
unbreakable:boolean
Remarks
Whether an item breaks or loses durability. Setting to true
temporarily removes item's durabilty HUD, and freezes
durability loss on item.
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