Skip to content

Legacy Terrain (0) Format

Byte Order

LegacyTerrain bytes are stored in Little Endian byte order.

Parsing The LegacyTerrain

NameSize (in bytes)Description
Block IDs32,768Block IDs defining the terrain. 8 bits per block, stored in YZX order[1] (Y increments first)
Block Data16,384Block data additionally defining parts of the terrain. 4 bits per block, stored in YZX order (Y increments first)
Sky light16,384The amount of sunlight or moonlight hitting each block. 4 bits per block, stored in YZX order (Y increments first)
Block light16,384The amount of block-emitted light in each block. 4 bits per block, stored in YZX order (Y increments first)
Heightmap256Each byte records the lowest level in each column where the light from the sky is at full strength. Stored in ZX order[2] (Z increments first)
2D Biome data1,024Each entry of the biome array contains a biome ID in the first byte, and the final 3 bytes are red/green/blue color values respectively

Second block layer for LegacyTerrain: LegacyBlockExtraData (4)

Notes

  1. Index is calculated with (X << 11) | (Z << 7) | Y
  2. Index is calculated with X × 16 + Z

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.