loadChunk

abstract fun loadChunk(x: Int, z: Int): Chunk?

Gets or loads the chunk at the given chunk coordinates, or returns null if there is no chunk at the given chunk coordinates.

That is, to calculate the chunk coordinate from a given block coordinate, the block coordinate is shifted right by 4 (divided by 16 and floored).

Beware that chunks loaded using this function will not be automatically unloaded!

Return

the loaded chunk, or null if not present

Parameters

x

the X coordinate

z

the Z coordinate