The item stack to apply the wearable trait to.
Optional
properties: Partial<ItemWearableTraitProperties>The optional properties of the wearable trait.
Readonly
identifierThe identifier of the trait.
Protected
Readonly
itemThe item stack that this trait is attached to.
Static
Readonly
componentStatic
Readonly
componentsThe item component that this trait is compatible with by default. If null, the trait will not attach to any item stack by default.
Static
Readonly
identifierThe identifier of the trait.
Static
Readonly
tagThe item tag that this trait is compatible with by default. If null, the trait will not attach to any item stack by default.
Static
Readonly
typesThe item type identifiers that this trait is compatible with by default.
The dynamic properties of the wearable trait.
The amount of protection the wearable item provides.
The amount of protection the wearable item provides.
The slot the wearable item can be equipped to.
The slot the wearable item can be equipped to.
Clones the item trait to another item stack.
The item stack to clone the component to.
A new item trait.
Compares another item trait to this one.
The other item trait to compare.
Whether the item traits are equal.
Equip the wearable item to the entity.
The entity to equip the item to.
Get the equipment slot of the wearable item.
The equipment slot of the wearable item.
Optional
onCalled when the trait is added to an object.
Optional
onCalled when the container that the item is stored in is closed.
The player that closed the container
Optional
onCalled when the container that the item is stored in is opened.
The player that opened the container.
Optional
onCalled when the release action is triggered by a player.
The player that released the item.
Optional
onCalled when the trait is removed from an object.
Optional
onCalled when the item has been signaled to cooldown.
The duration of the cooldown in ticks.
Optional
onCalled when the item is used by a player.
The player that used the item.
The additional options for the item use.
Whether the item use was successful; default is true
Optional
onCalled when the item cooldown has stopped.
Optional
onCalled when the item is stopped being used by a player.
The player that stopped using the item.
The additional options for the item use.
Optional
onCalled when the trait is ticked by the dimension.
The details about the tick event.
Called when the item is used by a player.
The player that used the item.
The additional options for the item use.
Optional
onCalled when the item is used on a block by a player.
The player that used the item.
The additional options for the item use.
Optional
onCalled when the item is used on an entity by a player.
The player that used the item.
The additional options for the item use.
Create a new wearable trait for the item stack.