Skip to main content

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

ParameterType
argBlockComponentPlayerPlaceBeforeEvent

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

ParameterType
argBlockComponentEntityFallOnEvent

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

ParameterType
argBlockComponentOnPlaceEvent

Returns

void


onPlayerDestroy()?

optional onPlayerDestroy: (arg) => void

Remarks

This function will be called when a player destroys a specific block.

Parameters

ParameterType
argBlockComponentPlayerDestroyEvent

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

ParameterType
argBlockComponentPlayerInteractEvent

Returns

void


onRandomTick()?

optional onRandomTick: (arg) => void

Remarks

This function will be called when a block randomly ticks.

Parameters

ParameterType
argBlockComponentRandomTickEvent

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

ParameterType
argBlockComponentStepOffEvent

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

ParameterType
argBlockComponentStepOnEvent

Returns

void


onTick()?

optional onTick: (arg) => void

Remarks

This function will be called when a block ticks.

Parameters

ParameterType
argBlockComponentTickEvent

Returns

void