WorldProvider
in
Table of Contents
- calculateChunkCount() : int
- Returns the number of chunks in the provider. Used for world conversion time estimations.
- close() : void
- Performs cleanups necessary when the world provider is closed and no longer needed.
- doGarbageCollection() : void
- Performs garbage collection in the world provider, such as cleaning up regions in Region-based worlds.
- getAllChunks() : Generator|array<string|int, ChunkData>
- Returns a generator which yields all the chunks in this world.
- getPath() : string
- getWorldData() : WorldData
- Returns information about the world
- getWorldMaxY() : int
- Gets the build height limit of this world
- getWorldMinY() : int
- Returns the lowest buildable Y coordinate of this world
- loadChunk() : ChunkData|null
- Loads a chunk (usually from disk storage) and returns it. If the chunk does not exist, null is returned.
Methods
calculateChunkCount()
Returns the number of chunks in the provider. Used for world conversion time estimations.
public
calculateChunkCount() : int
Return values
int —close()
Performs cleanups necessary when the world provider is closed and no longer needed.
public
close() : void
Return values
void —doGarbageCollection()
Performs garbage collection in the world provider, such as cleaning up regions in Region-based worlds.
public
doGarbageCollection() : void
Return values
void —getAllChunks()
Returns a generator which yields all the chunks in this world.
public
getAllChunks([bool $skipCorrupted = false ][, Logger|null $logger = null ]) : Generator|array<string|int, ChunkData>
Parameters
- $skipCorrupted : bool = false
- $logger : Logger|null = null
Tags
Return values
Generator|array<string|int, ChunkData> —getPath()
public
getPath() : string
Return values
string —getWorldData()
Returns information about the world
public
getWorldData() : WorldData
Return values
WorldData —getWorldMaxY()
Gets the build height limit of this world
public
getWorldMaxY() : int
Return values
int —getWorldMinY()
Returns the lowest buildable Y coordinate of this world
public
getWorldMinY() : int
Return values
int —loadChunk()
Loads a chunk (usually from disk storage) and returns it. If the chunk does not exist, null is returned.
public
loadChunk(int $chunkX, int $chunkZ) : ChunkData|null
Parameters
- $chunkX : int
- $chunkZ : int