Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • World

Implements

Index

Constructors

constructor

  • new World(name: string, seed: number, generator: string, ver: number, server: Server): World

Properties

_server

_server: Server

_worldMen

_worldMen: WorldManager

active

active: boolean = false

autoSaveInterval

autoSaveInterval: any

chunkFolder

chunkFolder: string

chunkUnloadInterval

chunkUnloadInterval: any

chunks

chunks: {}

Type declaration

entities

entities: object

folder

folder: string

generator

generator: any

name

name: string

seed

seed: number

version

version: number

Methods

existChunk

  • existChunk(id: types.XZ): boolean

getBlock

  • getBlock(data: types.XYZ, allowgen: boolean): Promise<Block>

getBlockSync

  • getBlockSync(data: types.XYZ, allowgen?: boolean): Block

getChunk

  • getChunk(id: types.XZ): Promise<Chunk>

getNeighborIDsChunks

  • getNeighborIDsChunks(id: types.XZ): types.XZ[]

getSettings

  • getSettings(): { generator: any; name: string; seed: number; version: number }

isBlockInBounds

  • isBlockInBounds(pos: types.XYZ): boolean

isChunkInBounds

  • isChunkInBounds(id: types.XZ): boolean

readChunk

  • readChunk(id: types.XZ): Promise<{ chunk: IView3duint16; metadata: any }>

readChunkSync

  • readChunkSync(id: types.XZ): { chunk: IView3duint16; metadata: any }

saveAll

  • saveAll(): void

saveChunk

  • saveChunk(id: types.XZ): Promise<void>

setBlock

  • setBlock(data: types.XYZ, block: string | number | Block, allowgen?: boolean): Promise<void>
  • Parameters

    • data: types.XYZ
    • block: string | number | Block
    • Default value allowgen: boolean = false

    Returns Promise<void>

setRawBlock

  • setRawBlock(data: types.XYZ, block: number): Promise<void>

stringToID

  • stringToID(id: string): types.XZ

unload

  • unload(): void

unloadChunk

  • unloadChunk(id: types.XZ): void

Generated using TypeDoc