This is the documentation for the block data files generated by the blocks script.
feather_blocks, the crate used by Feather which contains the Block enum
and block data structs, reads from block_data_1.xx.x.dat files to find
block state ID mappings for a given version. The generator in generator
is responsible for generating these files.
The Block enum in feather_blocks only contains the block types
in the "native" version, currently 1.13.2. This means that only blocks
from the native version are supported, but block state IDs for these
blocks can be found for any version for which block data files are
generated.
The following is the file format used for the block data files.
- u8, u16, u32, u64 - unsigned integer types, little-endian
- i8, i16, i32, i64 - signed integer types, little-endian
- string - length (u32) followed by
lengthUTF-8 bytes' - boolean -
u8, either 0 forfalseor 1 fortrue - array of X - length of array (number of values, not bytes) as a
u32, followed bylengthX values
- Header
- Raw bytes corresponding to FEATHER_BLOCK_DATA_FILE in ASCII
- Version name:
string(e.g. "1.14.4") - Protocol version:
u32(e.g. 498 for 1.14.4) - Is this a native mappings file?
bool
- State ID mappings
- Array of struct, stored in order of block types
if !native_mappings:- Native block state ID for block:
u16
- Native block state ID for block:
else:- Name of this block type, e.g.
minecraft:stone - Array of struct - property key-value pairs
- Name of property - e.g.
facing - Value of property for this block state - e.g.
west
- Name of property - e.g.
- Name of this block type, e.g.
- Block state ID for block in this version:
u16
- Array of struct, stored in order of block types