Java Edition Infdev 20100624 level format

It has been suggested that this page be moved to Zone file format.
If this move affects many pages or may potentially be controversial, do not move the page until a consensus is reached.
 [discuss, links]
When moving, be sure to use the appropriate tool instead of simply copying and pasting the page's contents, to preserve edit history.
BlockSprite rose.png: Sprite image for rose in Minecraft
This page describes content that has been removed and was only present in earlier versions of Java Edition.
 
The format only existed in Infdev 20100624 and was promptly scrapped, reverting to the Alpha level format when Infdev 20100625-0922 was released the following day.
This feature is exclusive to Java Edition.
 

The Zone file format is the binary file format for storing Java Edition chunks in Infdev 20100624. Each file stores a group of 32×32 chunks called a zone. The format temperately 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. No third party tools are known to exist that can read or write this format.

World folder structure

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 a seemingly random chunk position within the zone.

level.dat format

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:

  • [NBT Compound / JSON Object] The root tag.
    • [NBT Compound / JSON Object] Data: Global level data.
      • [Long] LastPlayed: Stores the Unix time stamp (in milliseconds) when the player saved the game.
      • [Long] SizeOnDisk: Estimated size of the entire world in bytes.
      • [Long] RandomSeed: Random number providing the random seed for the terrain.
      • [Int] SpawnX: X coordinate of the level's spawn position.
      • [Int] SpawnY: Y coordinate of the level's spawn position.
      • [Int] SpawnZ: Z coordinate of the level's spawn position.
      • [Long] Time: Stores the current "time of day" in ticks. There are 20 ticks per real-life second, and 24000 ticks per Minecraft day/night cycle, making the full cycle length 20 minutes. 0 is the start of daytime, 12000 is the start of sunset, 13800 is the start of nighttime, 22200 is the start of sunrise, and 24000 is daytime again. The value stored in level.dat is always increasing and can be larger than 24000, but the "time of day" is always modulo 24000 of the "Time" field value.
      • [NBT Compound / JSON Object] Player: The Singleplayer player for the level.
        • [NBT List / JSON Array] Pos: List of 3 TAG_Doubles for the X, Y, and Z position of the player.
        • [NBT List / JSON Array] Rotation: List of 2 TAG_Floats for the yaw and pitch of the player's view.
        • [NBT List / JSON Array] Motion: List of 3 TAG_Doubles for the X, Y, and Z motion in meters per tick.
        • [Float] FallDistance: How far the player has fallen.
        • [Short] Health: The number of hit points the player has. 20 is 10 hearts.
        • [Short] AttackTime: Number of ticks the player is immune to attacks.
        • [Short] HurtTime: Number of ticks the player is red from being attacked.
        • [Short] DeathTime: Number of ticks the player has been dead for - used for controlling the death animation.
        • [Short] Air: The number of ticks before the player starts to drown. Starts at 300.
        • [Short] Fire: When negative, the number of ticks before the player can catch on fire. When positive, the number of ticks before the fire is extinguished.
        • [Int] Score: The player's score. The score was never utilized.
        • [NBT List / JSON Array] Inventory: List of TAG_Compounds representing the items in the player's inventory.
          • [NBT Compound / JSON Object] An inventory item.
            • [Byte] Slot: The slot the item is in.
            • [Short] id: The item ID.
            • [Short] Damage: The item's data value, or damage value for tools.
            • [Byte] Count: The number of this item in the stack. Range -128 to 127. Values less than 2 are not displayed in-game.

Zone format

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 00 00 and should be skipped.

Padding 2040
Chunk slots Variable Concatenated chunk data. See table below for detail.

Each chunk is at an offset of (chunk_offset - 1) * (32768 * 3 + 256) + 4096

Chunk slot
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 y + z * ChunkSizeY(=128) + x * ChunkSizeY(=128) * ChunkSizeZ(=16)

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 z * ChunkSizeX(=16) * x

Entity format

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 entity_index * 512 + 1024. entity_index being the current iteration value up till Entity count.

Entity slot
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.
Extract the chunk X, Z positions with:
x = (Chunk position - 1) % 32
z = ( (Chunk position - 1) >> 5) % 32

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.

See also

Navigation