The block that this trait will be attached to.
Optional_options: JSONLikeObjectProtected ReadonlyblockThe block that this trait is attached to.
ReadonlycomponentThe block component that this trait is attached to.
Protected ReadonlydimensionThe dimension that the block is in.
ReadonlyidentifierThe identifier of the trait.
ReadonlystateThe block state key that this trait is attached to.
ReadonlytagThe block tag that this trait is attached to.
Static ReadonlycomponentThe block component that this trait is compatible with by default. If null, the trait will not attach to any block by default.
Static ReadonlyidentifierThe identifier of the trait.
Static ReadonlystateThe block state key that this trait is compatible with by default. If null, the trait will not be initialized by any block state.
Static ReadonlytagThe block tag that this trait is compatible with by default. If null, the trait will not attach to any block by default.
Static ReadonlytypesThe block type identifiers that this trait is compatible with by default.
OptionalonCalled when the trait is added to an object.
OptionalonCalled when the block is broken in the world.
Whether the block break was successful; default is true.
OptionalonCalled when a container that is attached to the block is updated.
The container that was updated.
OptionalonCalled when the block is interacted with by a player.
The options of the block interaction.
Whether the interaction was successful; default is true.
OptionalonCalled when a player pick blocks the block.
The player that picked the block.
Whether the player picked the block with a data request.
OptionalonCalled when the block is placed in the world.
The options of the block placement.
Whether the block placement was successful; default is true.
OptionalonCalled when the trait is random ticked by the dimension.
OptionalonCalled when the trait is removed from an object.
OptionalonOptionalonCalled when the block is started to be broken in the world.
The player that started to break the block.
OptionalonCalled when the block is stopped to be broken in the world.
The player that stopped breaking the block.
OptionalonCalled when the trait is ticked by the dimension.
The details about the tick event.
OptionalonCalled when the block is updated in the world.
Optionalsource: BlockThe source of the update, if any.
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 block trait.