The entity that the trait is attached to.
Optional
options: EntityItemStackTraitOptionsThe options for the trait, including the item stack and lifespan.
Readonly
birthThe birth tick of the item.
Whether the item can despawn according to its lifespan.
Whether the item can be merged with other items.
Protected
Readonly
entityThe entity that this trait is attached to.
Readonly
identifierThe identifier of the trait.
Protected
isThe merging state of the item.
Readonly
itemThe item stack of the component.
The lifespan of the item in ticks.
Protected
mergingThe target entity that the item is merging with.
Protected
pickupThe pickup tick of the item.
Protected
targetThe target player of the item.
Static
Readonly
componentsThe entity component identifiers that this trait is compatible with by default. If empty, the trait will not be initialized by any component.
Static
Readonly
identifierThe identifier of the trait.
Static
Readonly
typesThe entity type identifiers that this trait is compatible with by default.
Protected
dimensionThe dimension that the entity is in.
Clones the entity trait.
The entity to clone the trait to.
A new entity trait.
Optional
amount: numberOptional
amount: numberCalled when the trait is added to an object.
Optional
onCalled when the entity that this trait is attached executes a command.
The command execution state.
Whether the command was successful; default is true.
Optional
onCalled when a container that is attached to the entity is updated.
The container that was updated.
Optional
onCalled when the entity that this trait is attached to is killed.
The details of the entity death.
Optional
onCalled when the entity that this trait is attached to is despawned from a dimension.
The details of the entity despawn.
Optional
onCalled when the entity that this trait is attached to falls on a block.
The event properties of the entity falling on a block.
Optional
onCalled when the entity that this trait is attached to is interacted with by a player.
The player that interacted with the entity.
The method that the player used to interact with the entity.
Called when the trait is removed from an object.
Optional
onCalled then the entity that this trait is attached to is spawned into a dimension.
The details of the entity spawn.
Called when the trait is ticked by the dimension.
The details about the tick event.
Picks up the item by a player.
The player that picked up the item.
Creates a new instance of the EntityItemStackTrait.