SerenityJS
    Preparing search index...

    Represents a sub chunk.

    Index

    Constructors

    Properties

    biomes: BiomeStorage = ...

    The biomes of the sub chunk.

    index: null | number = null

    The index of the sub chunk.

    layers: BlockStorage[]

    The layers of the sub chunk.

    version: number

    The version of the sub chunk.

    Methods

    • Get the biome at the given 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 biome at the given block position.

    • 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.

      • layer: number

        The layer of the block.

      Returns number

      The block state.

    • Set the biome at the given 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.

      • biome: number

        The biome to set at the given block position.

      Returns void

    • 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.

      • Optionallayer: number

        The layer of the block.

      Returns void