mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-08 14:48:47 -04:00
Page:
BlockDB format
Pages
API breakages
API changes
BlockDB format
Bots
Brushes
Chat
Command Template
Commands
Compiling for .NET 2.0
Copy and paste
Creating levels
Custom blocks
Custom textures
Data and configuration files overview
Discord relay bot
Drawing
Home
Level format
Level permissions
Message blocks
Moderation
New release
Physics blocks
Portals
Public Custom Commands
Public Custom Plugins
Scripting
Standalone builds using mkbundle
World appearance
Clone
1
BlockDB format
UnknownShadow200 edited this page 2018-09-21 09:02:23 +10:00
Table of Contents
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