Options
All
  • Public
  • Public/Protected
  • All
Menu

Class extending InnerCoreBlockSource and adding some new methods not implemented in InnerCore API.

since

3.0

Hierarchy

  • any
    • BlockSource

Index

Constructors

Methods

  • getBiome(x: number, z: number): number
  • New implementation of InnerCoreBlockSource.getBiome, which gets the biome on given coordinates, even if the needed chunk is not loaded (takes from 3 to 5 ms in this case)

    since

    5.0

    Parameters

    • x: number
    • z: number

    Returns number

    numeric ID of the biome on given coordinates

  • getBiomeFast(x: number, z: number): number
  • Purely experimental variant of getBiome, which doesn't support modded biomes, gives 15-35% speed increase in the overworld, and 700-1000% increase in the nether

    since

    5.0

    Parameters

    • x: number
    • z: number

    Returns number

    numeric ID of the biome on given coordinates

  • setBlockState(x: number, y: number, z: number, state: BlockState, flags: number): boolean
  • Sets block properties object on given coordinates. Has to be called whenever you want to make changes to a certain block in the world. BlockState.setValue returns another BlockState object, which has to be specified here.

    since

    5.0

    Parameters

    • x: number
    • y: number
    • z: number
    • state: BlockState
    • flags: number

    Returns boolean

    whether the block state was set successfully or not

  • setBlockStateNoUpdate(x: number, y: number, z: number, state: BlockState): boolean
  • Same as setBlockState but without firing a block update event

    since

    5.0

    Parameters

    Returns boolean

    whether the block state was set successfully or not

  • getDefaultForDimension(dimensionId: number): BlockSource

Generated using TypeDoc