Skip to content
UnknownShadow200 edited this page Sep 20, 2018 · 1 revision

The BlockDB format is very simple, it solely consists of a sequence of 16 byte blocks.

BlockDB header block

This is the first block in a file.

8  | Format identifier "CBDB_MCG"
2  | Format version, currently '1'
2  | Width of the map
2  | Height of the map (vertical)
2  | Length of the map

Note: The map dimensions in the BlockDB may not be the same as the map dimensions in the map file. (If the map has been resized to be smaller for example)

BlockDB entry block

The rest of the file is a variable number of these blocks.

4  | Player ID
4  | Packed index (x + width * (z + y * length))
4  | Time delta in seconds from reference point (first second of year 2010)
1  | Old raw block ID
1  | New raw block ID
2  | Flags
BlockDB entry flags

This is a enumeration of bit flags that may or may not be set.

Bit 0  | Block was manually placed
Bit 1  | Block was painted
Bit 2  | Block was drawn
Bit 3  | Block was replaced
Bit 4  | Block was pasted
Bit 5  | Block was cut
Bit 6  | Block was filled
Bit 7  | Block was restored
Bit 8  | Block was undo of other
Bit 9  | Block was undo of self
Bit 10 | Block was redo of self
Bit 11 | Unused (physics change?)
Bit 12 | Unused
Bit 13 | Unused
Bit 14 | Old block is a custom block id
Bit 15 | New block is a custom block id 
Clone this wiki locally