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. Stored in the least-significant/right-most bit.
Bits Per Index7How many bits are used for each index into the palette. Stored in the 7 most-significant/left-most bits. May be one of 0,1,2,3,4,5,6,8,16,127. If 127 (null section) skip to reading the next palette version/bits per index. If 0 skip to reading a single Biome ID.

If Version is 1

NameSize (in bytes)Description
Biome Indicesceil(4096[1] ÷ Indices Per Block[2]) × 4Stored in blocks of 32 bits, with each block containing Indices Per Block indices, each occupying Bits Per Index bits. If Bits Per Index is 3, 5 or 6, then 2 bits of padding are on the most-significant/left-most side of each block, with indices packed into the remaining 30 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. Indices Per Block = floor(32 ÷ Bits Per Index)

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind
The avatar of contributor named as robofinch robofinch

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.


Documentation is licensed under Creative Commons CC-BY 4.0 unless otherwise noted. For more info, check the NOTICE file.