Bedrock Edition level format

Minecraft Pocket Edition uses a completely different format for its saved games. Not much is known about it. Pocket Edition does not use the NBT format, opting for a more compact binary format that has yet to be described.

level.dat
The seed of the level is saved as a big endian integer at offset 0x8 to 0xb.

It seems that the last modified time of a level is saved at 0x20 as a big-endian integer. The time is stored as seconds since the Unix epoch.

The name of the level begins with the length of the name as a short at offset 0x24, followed by the actual string at offset 0x26.

TBD

chunks.dat
This file is loosely based on the Region Files used by Minecraft PC. It contains up to 32x32 uncompressed chunks having Blocks, Data, SkyLight, and BlockLight arrays. It appears that Pocket Edition levels are not infinite and have a maximum size of 32x32 chunks or 512x512x128 blocks.

Its first 4096 bytes make up a location table that describes which chunks are present in the level and where they can be found inside chunks.dat. These bytes make up 1024 32-bit little-endian integers, called locations from here on.

Like in region files, the location's three most significant bytes tell which sector the chunk starts at, while its least significant byte tells how many sectors the chunk spans. A sector is 4096 bytes long. To extract the starting sector and sector count from the location, do something like

The location's position in the first 1024 entries tells the chunk's coordinates. To find the position for the location corresponding to a chunk position, use the familiar formula   (unverified). For example, chunk (8, 13)'s sector start and count are stored at the th, or 424th location in the location table.

Chunks are always 21 sectors long, because they store a 4 byte length field followed by four uncompressed arrays: Blocks (8 sectors), Data(4), SkyLight(4), BlockLight(4).

Unlike Region Files, the chunks.dat does not use its second sector to store modification times. The first chunk in the file is stored in this sector (starting from offset 0x1000).

player.dat
The toolbar slots are saved starting from offset 0x34. There are 8 slots, and each slot uses 4 bytes; The first byte is the data value, The other three bytes always seem to be 0; their purpose is unknown.

TBD