Interface BlockCustomComponent

Contains a set of events that will be raised for a block. This object must be bound using the BlockRegistry.

Hierarchy

  • BlockCustomComponent

Properties

beforeOnPlayerPlace?: ((arg) => void)

Type declaration

onEntityFallOn?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an entity falls onto the block that this custom component is bound to.

onPlace?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when the block that this custom component is bound to is placed.

onPlayerDestroy?: ((arg) => void)

Type declaration

onPlayerInteract?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when a player sucessfully interacts with the block that this custom component is bound to.

onRandomTick?: ((arg) => void)

Type declaration

onStepOff?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an entity steps off the block that this custom component is bound to.

onStepOn?: ((arg) => void)

Type declaration

    • (arg): void
    • Parameters

      Returns void

      Remarks

      This function will be called when an entity steps onto the block that this custom component is bound to.

onTick?: ((arg) => void)

Type declaration

    • (arg): void
    • Parameters

      Returns void

      Remarks

      This function will be called when a block ticks.