A cached buffer of the serialized chunk.
If the chunk has been modified, and has not been saved.
Readonly
hashThe hash key of the chunk.
If the chunk is ready to be sent to the client.
Readonly
subchunksThe sub chunks of the chunk.
Readonly
typeThe dimension type of the chunk.
Readonly
xThe X coordinate of the chunk.
Readonly
zThe Z coordinate of the chunk.
Static
Readonly
MAX_The maximum amount of sub chunks.
Get all the block storage of the chunk.
An array of all the block storage compound tags.
Get the biome at the given position.
The block position to get the biome at.
The biome at the given block position.
Get the block storage at the given position.
The position to get the block storage at.
The block storage compound tag, or null if none exists.
Get the bottommost level in which a permutation is not air, at the given X and Z coordinates.
The position to query.
The bottommost level in which a permutation is not air.
Get the permutation at the given X, Y and Z coordinates.
The position.
The state layer.
Get the amount of sub chunks that need to be sent.
Get the topmost level in which a permutation is not air, at the given X and Z coordinates.
The position to query.
The topmost level in which a permutation is not air.
Check if the chunk has block storage at the given position.
The position to check for block storage.
True if the chunk has block storage at the given position, false otherwise.
Check if the chunk is empty.
Set the biome at the given position.
The block position to set the biome at.
The biome type to set at the given block position.
If the chunk should be marked as dirty. Default is true.
Set the block storage at the given block position.
The block position to set the block storage at.
The block storage compound tag, or null to delete the block storage.
If the chunk should be marked as dirty. Default is true.
Set the permutation at the given X, Y and Z coordinates.
The position.
The permutation.
The state layer.
Static
deserializeDeserialize a buffer into a chunk.
The dimension type of the chunk.
The X coordinate of the chunk.
The Z coordinate of the chunk.
The buffer to deserialize.
If block palette should be deserialized as NBT.
The deserialized chunk.
Static
serializeSerialize the chunk into a buffer.
The chunk to serialize.
If block palette should be serialized as NBT.
The serialized buffer.
Represents a chunk within a Dimension instance. Chunks hold sub chunks, which hold block states (BlockPermutations). Chunks can be dirty, meaning they have been modified and need to be saved.
Example Usage