Skip to content

Data3D (+) Format

Byte Order

Data3D data is stored in Little Endian byte order.

Parsing Data3D

NameSize (in bytes)Description
Heightmap512The heightmap for the chunk. Subtract 64 to get the real Y coordinate. Stored as 16-bit integers. ZX order (Z increments first)

Loop next section 24 times until you have parsed all subchunks biome palettes.

NameSize (in bits)Description
Palette Version1Seems to always be 1
Bits Per Word7How many bits are used for each word. If 127 skip to reading the next palette version/bits per word (null section). If 0 skip to reading a single Biome ID.

If Version is 1

NameSize (in bytes)Description
Biome Indicesceil(4096[1] ÷ Blocks Per Word[2]) × 4Stored as Blocks Per Word indices, with each unsigned 32-bit integer containing multiple indices, each occupying Bits Per Word bits. The indices are packed and stored in YZX order (Y increments first).
Palette Size4The number of Biome palettes stored.

Now loop the next section Palette Size times until you have parsed all biome ids.

NameSize (in byte)Description
Biome ID4A biome Id. Stored as 32-bit unsigned integers.

Notes

  1. In some languages you may need to write this as 4096.0 instead of just 4096 for the correct output.
  2. Blocks Per Word = floor(32 ÷ Bits Per Word)

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.