Creates a new block storage.
Optional
palette: number[]The optional palette.
Optional
blocks: number[]The optional blocks.
Readonly
airThe air value of the storage.
Readonly
blocksThe blocks of the storage.
Readonly
paletteThe palette of the storage.
Static
Readonly
MAX_The total maximum chunk size.
Static
Readonly
MAX_The maximum chunk size in the x direction.
Static
Readonly
MAX_The maximum chunk size in the y direction.
Static
Readonly
MAX_The maximum chunk size in the z direction.
Gets the block state at the given coordinates.
The x coordinate of the block.
The y coordinate of the block.
The z coordinate of the block.
The block state.
Checks if the block storage is empty.
Sets the block state at the given coordinates.
The x coordinate of the block.
The y coordinate of the block.
The z coordinate of the block.
The block state.
Static
deserializeDeserializes the block storage from a binary stream.
The binary stream to read from.
The block storage.
Static
getCalculates the index of the block position.
The x coordinate of the block.
The y coordinate of the block.
The z coordinate of the block.
The index of the block.
Static
serializeSerializes the block storage to a binary stream.
The binary stream to write to.
Represents a block storage.