Skip to content

Instantly share code, notes, and snippets.

@Tomcc
Tomcc / runtimeid_table.json
Last active August 20, 2021 23:57
RuntimeID temporary static lookup table
[
{
"data": 0,
"id": 0,
"name": "minecraft:air",
"runtimeID": 0
},
{
"data": 0,
"id": 1,
@Tomcc
Tomcc / blockstate_protocol.md
Last active April 9, 2024 08:42
Block Changes in Beta 1.2.13

Block Storage & Network Protocol Changes

Paletted chunks & removing BlockIDs brings a few big changes to how blocks are represented. In Bedrock, Blocks used to be represented by their 8 bit ID and 4 bit data; this means that we can only represent 256 blocks and 16 variants for each block. As it happens we ran out of IDs in Update Aquatic, so we had to do something about it :)

After this change, we can represent infinite types of Blocks and infinite BlockStates, just like in Java. BlockStates are what is sent over the network as they are roughly equivalent to the old ID+data information, eg. they're all the information attached to a block.

BlockStates are serialized in two ways:

PersistentID: a PersistentID is a NBT tag containing the BlockState name and its variant number; for example