Skip to content

Level Format

Byte Order

level.dat is stored in Little Endian byte order.

Parsing level.dat

Tag NameTag TypeDescription
GameTypeIntTagWhether in survival (0) or in creative (1) mode.
LastPlayedLongTagStores the Unix time stamp (in seconds) when the player saved the game.
LevelNameStringTagSpecifies the name of the level.
PlatformIntTagSeems to store the platform that the level is created on. Currently observed value is 2.
PlayerCompoundTagPlayer entity information. See Entity Format for details. It is missing the id tag and has additional elements.
RandomSeedLongTagRandom number providing the Random Seed for the terrain.
SizeOnDiskLongTagEstimated size of the entire world in bytes.
SpawnXIntTagX coordinate of the world's spawn position. Default is 0.
SpawnYIntTagY coordinate of the world's spawn position. Default is 64.
SpawnZIntTagZ coordinate of the world's spawn position. Default is 0.
StorageVersionIntTagVersion of Bedrock Edition NBT, is 3.
TimeLongTagStores the current "time of day" in ticks. There are 20 ticks per real-life second, and 19200 ticks per Minecraft daylight cycle, making the full cycle length 16 minutes—4 minutes shorter than the standard 20 minute daylight cycle.
dayCycleStopTimeLongTagDetermines the tick the daylight cycle is paused at. Values at or above 2,147,483,648 (231) result in the daylight cycle not being paused. Default value is 5,000 in creative mode, and 18,446,744,073,709,551,615 (264-1) in survival mode.
spawnMobsIntTagDisable (0) or enable (1) mob spawning.

Player Data

Tag NameTag TypeDescription
ArmorListTag of CompoundTagsEach CompoundTag in this list defines a piece of armor that the player is wearing. This is a list with length 4 - for helmet, chestplate, leggings, and boots.
DimensionIntTagThe dimension the player is in. 0 is the Overworld.
InventoryListTag of CompoundTagsEach TAG_Compound in this list defines an item the player is carrying or holding.
ScoreIntTagThe score of the player.
SleepingByteTag1 or 0 (true/false) - true if the player was in a bed when this tag was saved; has no effect on whether the player is in a bed when they log in.
SleepTimerShortTagThe number of ticks the player had been in bed when this tag was saved. No effect.
SpawnXIntTagX coordinate of the player's spawn position. Default is 0.
SpawnYIntTagY coordinate of the player's spawn position. Default is 64.
SpawnZIntTagZ coordinate of the player's spawn position. Default is 0.
abilitiesCompoundTagThe abilities this player has.

Armor Data

Tag NameTag TypeDescription
idShortTagItem or Block ID.
DamageShortTagFor armor, the amount of wear they have suffered. The maximum durability of the armor means undamaged. When the Damage reaches 0, it breaks and disappears.
CountByteTagNumber of items stacked in this inventory slot. Any item can be stacked, including tools. Range is 1-255. Values above 255 are not displayed in-game.

Inventory Data

Tag NameTag TypeDescription
idShortTagItem or Block ID.
DamageShortTagFor armor, the amount of wear they have suffered. The maximum durability of the armor means undamaged. When the Damage reaches 0, it breaks and disappears.
CountByteTagNumber of items stacked in this inventory slot. Any item can be stacked, including tools. Range is 1-255. Values above 255 are not displayed in-game.
SlotByteTagIndicates which inventory slot this item is in.

Abilities Data

Tag NameTag TypeDescription
mayflyByteTag1 or 0 (true/false) - true if the player can fly.
flyingByteTag1 or 0 (true/false) - true if the player is currently flying.
invulnerableByteTag1 or 0 (true/false) - true if the player is immune to all damage and harmful effects except for void damage.
mayBuildByteTag1 or 0 (true/false) - true if the player can place and destroy blocks.
instabuildByteTag1 or 0 (true/false) - true if the player can instantly destroy blocks.

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.