![]() |
VOOZH | about |
The Zone file format[1][2][3][4] is the binary file format for storing chunks in Infdev 20100624. Each file stores a group of 32Γ32 chunks called a zone. The format temporarily took the place of the Alpha level format but was reverted in the version immediately after due to the new save format being completely uncompressed and making world files obscenely large compared to those with the Alpha level format. A quick 5 minute walk produces a world size of several hundred megabytes. Later versions cannot read worlds saved in this format, and attempting to open one causes the entire world to regenerate.
An Infdev 20100624 level is actually a single folder containing at least one file named level.dat.
The level folder will have a data folder containing zone_X_Z.dat and entities_X_Z.dat files where X and Z are the base36 representation of the first chunk position loaded within the zone at the time of saving.[note 1]
The level.dat file is a GZip'd NBT file that stores global level data (time of day, player health, inventory, velocity, and position within the map, etc.). Most importantly, it stores the Random Seed that the terrain generator uses to seamlessly generate more terrain on the fly.
This file has this structure:
| Name | Size (bytes) | Description |
|---|---|---|
| Magic number | 4 | A number used to identify the file. Always 13 73 70 00
|
| Version | 2 | A version identifier byte. Always 00 00
|
| Chunk count | 2 | The number of chunks stored in this zone. 04 00 (1024) max.
|
| Chunk offsets | 2048 | Holds Chunk Count offsets which point to chunk data. Stored as 1024 16-bit integers.
Empty chunk locations are marked with |
| Padding | 2040 | |
| Chunk slots | Variable | Concatenated chunk data. See table below for detail.
Each chunk is at an offset of |
| Name | Size (bytes) | Description |
|---|---|---|
| Chunk X | 4 | The X chunk coordinate. |
| Chunk Z | 4 | The Z chunk coordinate. |
| Last update | 8 | The tick when the chunk was last updated. |
| Terrain populated | 8 | 1 or 0 (true/false) - true if Minecraft has generated special features in this chunk such as trees, flowers, ores, dungeons. This is a boolean stored as a 64-bit integer. |
| Padding | 232 | |
| Blocks | 32768 | YZX ordered block IDs, 8 bits per block.
Indexed with |
| Data | 16384 | YZX ordered block data, 4 bits per block. |
| Sky light | 16384 | Stores the maximum sky light that reaches each block, regardless of current time. 4 bits per block. |
| Block light | 16384 | Stores the amount of block-emitted light in each block. 4 bits per block. |
| Height map | 256 | ZX ordered height map information, 8 bits per XZ column.
Indexed with |
| Name | Size (bytes) | Description |
|---|---|---|
| Magic number | 4 | A number used to identify the file. Always 13 73 70 01
|
| Version | 2 | A version identifier byte. Always 00 00
|
| Entity count | 4 | The number of entities stored in this entity zone. |
| Padding | 1014 | |
| Entity slots | Variable | Concatenated GZIP'd NBT data of the entity or tile entity. See table below for detail.
Each entity is at an offset of |
| Name | Size (bytes) | Description |
|---|---|---|
| Chunk position | 2 | The relative chunk position within the zone that the entity is in, shifted into one value.
If the Chunk position is less than 0, apply unary negation to the value before continuing. |
| Compressed data size | 2 | The number of bytes to read for the compressed entity or tile entity data. |
| Next extended entity data index | 4 | The index of the next entity slot containing additional entity data if Compressed data size is greater than 500. Its value is -1 if no other slots follow. This value is equivalent to the entity_index value above, with the actual offset needing to be calculated separately.
|
| Previous extended entity data index | 4 | The index of the previous slot that links back to earlier entity data. Its value is -1 if this is the first slot. This value is also equivalent to the entity_index value above, with the actual offset needing to be calculated separately.
|
| Compressed data | Variable | The GZIP'd NBT entity or tile entity data. |
net/minecraft/world/level/chunk/storage/ZonedChunkStorage.class, Java Edition Beta 1.2 02 (20110517)
net/minecraft/world/level/chunk/storage/ZoneFile.class, Java Edition Beta 1.2 02 (20110517)
net/minecraft/world/level/chunk/storage/ZoneIo.class, Java Edition Beta 1.2 02 (20110517)