Level Format
Byte Order
The level format is stored in Big Endian byte order.
NBT structure
- The root tag.
- Data: Global level data
- LastPlayed: Stores the Unix time stamp (in milliseconds) when the player saved the game.
- SizeOnDisk: Estimated size of the entire world in bytes.
- RandomSeed: Random number providing the random seed for the terrain.
- SpawnX: X coordinate of the level's spawn position.
- SpawnY: Y coordinate of the level's spawn position.
- SpawnZ: Z coordinate of the level's spawn position.
- 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.
- Player: The singleplayer player for the level.
- id: The id of the player. Always
LocalPlayer
- Pos: List of 3 DoubleTags for the X, Y, and Z position of the player.
- Rotation: List of 2 FloatTags for the yaw and pitch of the player's view.
- Motion: List of 3 DoubleTags for the X, Y, and Z motion in meters per tick.
- FallDistance: How far the player has fallen.
- Health: The number of hit points the player has. 20 is 10 hearts.
- AttackTime: Number of ticks the player is immune to attacks.
- HurtTime: Number of ticks the player is red from being attacked.
- DeathTime: Number of ticks the player has been dead for - used for controlling the death animation.
- Air: The number of ticks before the player starts to drown. Starts at 300.
- 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.
- Score: The player's score. The score was never utilized in Alpha or even beta, so this value is irrelevant.
- Inventory: List of CompoundTags representing the items in the player's inventory.
- An inventory item.
- Slot: The slot the item is in.
- id: The item ID.
- Damage: The item's data value, or damage value for tools.
- Count: The number of this item in the stack. Range -128 - 127. Values less then 2 are not displayed in-game.
- An inventory item.
- id: The id of the player. Always
- Data: Global level data