BlockCustomComponent Interface
Caution
This interface is still in pre-release. Its signature may change or it may be removed in future releases.
Contains a set of events that will be raised for a block. This object must be bound using the BlockRegistry.
Properties
beforeOnPlayerPlace
beforeOnPlayerPlace?: (arg: BlockComponentPlayerPlaceBeforeEvent) => void;
This function will be called before a player places the block.
Type: (arg: BlockComponentPlayerPlaceBeforeEvent) => void
onEntityFallOn
onEntityFallOn?: (arg: BlockComponentEntityFallOnEvent) => void;
This function will be called when an entity falls onto the block that this custom component is bound to.
Type: (arg: BlockComponentEntityFallOnEvent) => void
onPlace
onPlace?: (arg: BlockComponentOnPlaceEvent) => void;
This function will be called when the block that this custom component is bound to is placed.
Type: (arg: BlockComponentOnPlaceEvent) => void
onPlayerDestroy
onPlayerDestroy?: (arg: BlockComponentPlayerDestroyEvent) => void;
This function will be called when a player destroys a specific block.
Type: (arg: BlockComponentPlayerDestroyEvent) => void
onPlayerInteract
onPlayerInteract?: (arg: BlockComponentPlayerInteractEvent) => void;
This function will be called when a player sucessfully interacts with the block that this custom component is bound to.
Type: (arg: BlockComponentPlayerInteractEvent) => void
onRandomTick
onRandomTick?: (arg: BlockComponentRandomTickEvent) => void;
This function will be called when a block randomly ticks.
Type: (arg: BlockComponentRandomTickEvent) => void
onStepOff
onStepOff?: (arg: BlockComponentStepOffEvent) => void;
This function will be called when an entity steps off the block that this custom component is bound to.
Type: (arg: BlockComponentStepOffEvent) => void
onStepOn
onStepOn?: (arg: BlockComponentStepOnEvent) => void;
This function will be called when an entity steps onto the block that this custom component is bound to.
Type: (arg: BlockComponentStepOnEvent) => void
onTick
onTick?: (arg: BlockComponentTickEvent) => void;
This function will be called when a block ticks.
Type: (arg: BlockComponentTickEvent) => void
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for