Interface: BlockCustomComponent
Contains a set of events that will be raised for a block. This object must be bound using the BlockRegistry.
Properties
beforeOnPlayerPlace()?
optional
beforeOnPlayerPlace: (arg
) =>void
Remarks
This function will be called before a player places the block.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentPlayerPlaceBeforeEvent |
Returns
void
onEntityFallOn()?
optional
onEntityFallOn: (arg
) =>void
Remarks
This function will be called when an entity falls onto the block that this custom component is bound to.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentEntityFallOnEvent |
Returns
void
onPlace()?
optional
onPlace: (arg
) =>void
Remarks
This function will be called when the block that this custom component is bound to is placed.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentOnPlaceEvent |
Returns
void
onPlayerDestroy()?
optional
onPlayerDestroy: (arg
) =>void
Remarks
This function will be called when a player destroys a specific block.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentPlayerDestroyEvent |
Returns
void
onPlayerInteract()?
optional
onPlayerInteract: (arg
) =>void
Remarks
This function will be called when a player sucessfully interacts with the block that this custom component is bound to.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentPlayerInteractEvent |
Returns
void
onRandomTick()?
optional
onRandomTick: (arg
) =>void
Remarks
This function will be called when a block randomly ticks.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentRandomTickEvent |
Returns
void
onStepOff()?
optional
onStepOff: (arg
) =>void
Remarks
This function will be called when an entity steps off the block that this custom component is bound to.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentStepOffEvent |
Returns
void
onStepOn()?
optional
onStepOn: (arg
) =>void
Remarks
This function will be called when an entity steps onto the block that this custom component is bound to.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentStepOnEvent |
Returns
void
onTick()?
optional
onTick: (arg
) =>void
Remarks
This function will be called when a block ticks.
Parameters
Parameter | Type |
---|---|
arg | BlockComponentTickEvent |
Returns
void