ChunkData

Chunk's blocks, lights and other immutable data.

Members

Functions

decode
void decode(Buffer o_buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
encode
void encode(Buffer o_buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

FIELDS
enum string[] FIELDS;
Undocumented in source.
biomes
ubyte[256] biomes;

Biomes in order xz.

blockEntities
ubyte[] blockEntities;

Additional data for the chunk's block entities (tiles), encoded in the same way as BlockEntityData.nbt is. The position is given by the Int tags x, y, z which are added to the block's compound tag together with the String tag id that contains the name of the tile in pascal case. Wrong encoding or missing tags may result in the block becoming invisible.

borders
ubyte[] borders;

Colums where there are world borders (in format xz). This feature hasn't been implemented in the game yet and crashes the client.

extraData
sul.protocol.pocket101.types.ExtraData[] extraData;
Undocumented in source.
heights
ushort[256] heights;

Coordinates of the highest block in the column that receives sky light (order xz). It is used to increase the speed when calculating the block's light level.

sections
sul.protocol.pocket101.types.Section[] sections;

16x16x16 section of the chunk. The array's keys also indicate the section's height (the 3rd element of the array will be the 3rd section from bottom, starting at y=24). The amount of sections should be in a range from 0 (empty chunk) to 16.

Meta