Class BlockAction

Defines a block action that can be performed in a TriggerSheet.

BlockAction

Constructors

Properties

parameters: any

The parameters for this block action.

Memberof

BlockAction

type: string

The type of this block action in the game.

Memberof

BlockAction

Methods

  • Serializes the block action into a JSON object.

    Returns any

    The serialized block action as a JSON object.

    Memberof

    BlockAction

  • Creates an explosion at the specified offset from the affected block.

    Parameters

    • x: number

      The x offset.

    • y: number

      The y offset.

    • z: number

      The z offset.

    • block: Block

      The block to be used to replace all blocks affected by the explosion.

    Returns BlockAction

    Static

    Memberof

    BlockAction

  • Plays a sound globally.

    Parameters

    • sound: string

      The sound to play.

    • Optional volume: number = 1

      The volume of the sound.

    • Optional pitch: number = 1

      The pitch of the sound.

    • Optional pan: number = 0

      The pan of the sound.

    Returns BlockAction

    Static

    Memberof

    BlockAction

  • Replaces a block at the specified offset from the affected block with the specified block state.

    Parameters

    • x: number

      The x offset.

    • y: number

      The y offset.

    • z: number

      The z offset.

    • block: Block

      The block to replace the existing block with.

    Returns BlockAction

    Static

    Memberof

    BlockAction

  • Runs a trigger at the specified offset from the affected block.

    Parameters

    • x: number

      The x offset.

    • y: number

      The y offset.

    • z: number

      The z offset.

    • trigger: string

      The trigger to run.

    • Optional tickDelay: number = 0

      The number of ticks to delay the trigger.

    Returns BlockAction

    Static

    Memberof

    BlockAction

  • Sets the block state parameters at the specified offset from the affected block.

    Parameters

    • x: number

      The x offset.

    • y: number

      The y offset.

    • z: number

      The z offset.

    • params: any

      The block state parameters to be used.

    Returns BlockAction

    Static

    Memberof

    BlockAction

Generated using TypeDoc