SerenityJS
    Preparing search index...

    Represents a block storage.

    Index

    Constructors

    Properties

    air: number

    The air value of the storage.

    blocks: number[]

    The blocks of the storage.

    palette: number[]

    The palette of the storage.

    MAX_SIZE: number = ...

    The total maximum chunk size.

    MAX_X: 16

    The maximum chunk size in the x direction.

    MAX_Y: 16

    The maximum chunk size in the y direction.

    MAX_Z: 16

    The maximum chunk size in the z direction.

    Methods

    • Gets the block state at the given coordinates.

      Parameters

      • bx: number

        The x coordinate of the block.

      • by: number

        The y coordinate of the block.

      • bz: number

        The z coordinate of the block.

      Returns number

      The block state.

    • Sets the block state at the given coordinates.

      Parameters

      • bx: number

        The x coordinate of the block.

      • by: number

        The y coordinate of the block.

      • bz: number

        The z coordinate of the block.

      • state: number

        The block state.

      Returns void

    • Calculates the index of the block position.

      Parameters

      • bx: number

        The x coordinate of the block.

      • by: number

        The y coordinate of the block.

      • bz: number

        The z coordinate of the block.

      Returns number

      The index of the block.