World.ChunkStateChangedFunction
since: 2.4.0b122 (only on 32-bit devices)
Callable
Parameters
chunkX: number
chunk X coordinate; multiply by 16 to receive corner block coordinates
chunkZ: number
chunk Z coordinate; multiply by 16 to receive corner block coordinates
dimensionId: number
current dimension's numeric ID
lastState: number
previous chunk loading state
state: number
new chunk loading state
discarded: boolean
was chunk previously loaded and unloaded from memory (only after generation was completed)
Returns void
Function that is used in World.addListenerChunkStateChanged and World.addLocalListenerChunkStateChanged.
In 2.4.0b123, replaced with "ChunkLoaded/Discarded" callbacks in 3.1.0b125.