The entity that this trait will be attached to.
Optional_options: unknownProtected ReadonlyentityThe entity that this trait is attached to.
ReadonlyidentifierThe identifier of the trait.
ReadonlyplayerThe player that this trait is attached to.
Static ReadonlycomponentsThe entity component identifiers that this trait is compatible with by default. If empty, the trait will not be initialized by any component.
Static ReadonlyidentifierThe identifier of the trait.
Static ReadonlytypesThe entity type identifiers that this trait is compatible with by default.
ProtecteddimensionThe dimension that the entity is in.
Clones the entity trait.
The entity to clone the trait to.
A new entity trait.
Gets the amount of experience points the player has in their current level.
The amount of experience points.
Get the current experience progress of the player.
The current experience progress of the player (0-1).
Get the current xp level of the player.
The current level of the player.
Gets the total amount of experience points the player has.
The total amount of experience points.
Called when the trait is added to an object.
OptionalonOptionalonCalled when the player sends a chat message.
The message that the player sent.
Whether the chat message was successful; default is true
OptionalonCalled when the entity that this trait is attached executes a command.
The command execution state.
Whether the command was successful; default is true.
OptionalonCalled when a container that is attached to the entity is updated.
The container that was updated.
Called when the entity that this trait is attached to is killed.
The details of the entity death.
OptionalonCalled when the entity that this trait is attached to is despawned from a dimension.
The details of the entity despawn.
OptionalonCalled when the entity that this trait is attached to falls on a block.
The event properties of the entity falling on a block.
OptionalonCalled when a players gamemode is changed.
The previous gamemode of the player.
OptionalonCalled 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.
OptionalonCalled when the player jumps.
OptionalonCalled when the trait is random ticked by the dimension.
Called when the trait is removed from an object.
OptionalonCalled then the entity that this trait is attached to is spawned into a dimension.
The details of the entity spawn.
OptionalonCalled when the player starts sneaking.
OptionalonCalled when the player starts sprinting.
OptionalonCalled when the player stops sneaking.
OptionalonCalled when the player stops sprinting.
OptionalonCalled when the entity that this trait is attached to is teleported.
The details of the entity teleport.
OptionalonCalled when the trait is ticked by the dimension.
The details about the tick event.
Sets the total experience points of the player. This will automatically calculate and set the player's level and experience progress.
The total amount of experience points to set.
Sets the probability of this trait being randomly ticked each tick.
The numerator of the probability fraction.
The denominator of the probability fraction.
Wether this trait should be randomly ticked this tick.
A factor to multiply the chance by. Default is 1.
True if the trait should be randomly ticked, false otherwise.
Creates a new instance of the entity trait.