Hierarchy

Properties

The blocks in the chunk relative to the chunk.

blocksX: number[]

Package

chunk: unknown

Package

chunkData: {
    biomes: unknown;
    bitMap: unknown;
    chunkData: unknown;
}

Package

Type declaration

  • biomes: unknown
  • bitMap: unknown
  • chunkData: unknown
client: Client
hash: string
server: Server
x: number
z: number

Constructors

  • Package

    Parameters

    • client: Client
    • pChunk: unknown
    • chunkPosition: {
          x: number;
          z: number;
      }
      • x: number
      • z: number

    Returns LoadedChunk

Methods

  • Returns void

  • Package

    Parameters

    • name: string
    • contents: object

    Returns void

  • Example

    for (let x = 0; x < 16; x++)
    for (let z = 0; z < 16; z++)
    for (let y = 0; y < 100; y++)
    chunk.setBlock('grass_block', { x, y, z }, { snowy: false });

    Parameters

    • block: blockName
    • chunkRelativeLocation: {
          x: number;
          y: number;
          z: number;
      }

      The location relative to the chunk. Must be between 0 and 15.

      • x: number
      • y: number
      • z: number
    • Optional state: blockState

    Returns LoadedChunk

  • Set a block without sending a packet to the client.

    Package

    Parameters

    • block: blockName
    • chunkRelativeLocation: {
          x: number;
          y: number;
          z: number;
      }

      The location relative to the chunk. Must be between 0 and 15.

      • x: number
      • y: number
      • z: number
    • Optional state: blockState

    Returns LoadedChunk