Skip to content

Level Format

Byte Order

The level format is stored in Big Endian byte order.

MinecraftLevel (Root) Data

Tag NameTag TypeDescription
AboutCompoundTagInformation about the level.
EnvironmentCompoundTagInformation about the environment, varies based on map settings.
MapCompoundTagThe map data.
EntitiesListTagListTag of CompoundTags holding all the entities in the level.
TileEntitiesListTagListTag of CompoundTags holding all the tile entities in the level.

About Data

Tag NameTag TypeDescription
CreatedOnLongTagThe Unix timestamp of when the level was created.
NameStringTagThe name of the level. Always A Nice World.
AuthorStringTagThe name of the user who created the level.

Environment Data

Tag NameTag TypeDescription
TimeOfDayShortTagThe time in ticks affecting the daylight cycle. Range: 0 - 24000.
SkyBrightnessByteTagThe sky light level. Range: 0 - 15.
SkyColorIntTagThe RGB color of the sky, 24 bits. Red is SkyColor >> 16 & 255, Green is SkyColor >> 8 & 255, and Blue is SkyColor & 255.
FogColorIntTagThe RGB color of the sky, 24 bits. Red is FogColor >> 16 & 255, Green is FogColor >> 8 & 255, and Blue is FogColor & 255.
CloudColorIntTagThe RGB color of the sky, 24 bits. Red is CloudColor >> 16 & 255, Green is CloudColor >> 8 & 255, and Blue is CloudColor & 255.
CloudHeightShortTagThe height of the clouds.
SurroundingGroundTypeByteTagThe block ID of the "surrounding ground".
SurroundingGroundHeightShortTagThe height of the "surrounding ground".
SurroundingWaterTypeByteTagThe block ID of the "surrounding water".
SurroundingWaterHeightShortTagThe height of the "surrounding water".

Map Data

Tag NameTag TypeDescription
WidthShortTagThe width of the level. (X direction)
LengthShortTagThe length of the level. (Z direction)
HeightShortTagThe height of the level. (Y direction)
SpawnListTagListTag of 3 ShortTags holding the X, Y, and Z spawn coordinates.
BlocksByteArrayTagWidth×Length×Height bytes of block IDs (8 bits). XZY order (X increments first)[1]
DataByteArrayTagWidth×Length×Height bytes of block data (4 bits) and light data (next 4 bits). XZY order (X increments first)

Entities Data

Tag NameTag TypeDescription
idStringTagThe entity ID.
PosListTagListTag of 3 FloatTags holding the X, Y, and Z position of the entity.
RotationListTagListTag of 2 FloatTags holding the yaw and pitch of the entities view.
MotionListTagListTag of 3 FloatTags holding the X, Y, and Z motion of the entity in meters per tick.
FallDistanceFloatTagHow far the entity has fallen.
HealthShortTagThe number of hit points the entity has. 20 is 10 hearts.
AttackTimeShortTagNumber of ticks the entity is immune to attacks for.
HurtTimeShortTagNumber of ticks the entity is red from being attacked.
DeathTimeShortTagNumber of ticks the entity has been dead for. (used for death animation)
AirShortTagThe number of ticks before the entity starts to drown. It starts at 300.
FireShortTagWhen negative, the number of ticks before the entity can catch on fire. When positive, the number of ticks before the fire is extinguished.
AdditionalEntityTagsTagTypeSee Additional Entity Tags

TileEntities Data

Tag NameTag TypeDescription
idStringTagThe tile entity ID.
PosIntTagPosition of the tile entity[2].
ItemsListTagListTag of CompoundTags holding the items in the container.
AdditionalTileEntityTagsTagTypeSee Additional Tile Entity Tags

Items Data

Tag NameTag TypeDescription
SlotByteTagThe slot the item is in.
idShortTagThe item ID.
DamageShortTagThe item's data value, or damage value for tools.
CountByteTagThe number of this item in the stack. Range -128 to 127. Values less then 2 are not displayed in-game.

Additional Entity Tags

Item (Entity)

NOTE: Item entity doesn't have the AttackTime, HurtTime, and DeathTime tags.

Tag NameTag TypeDescription
AgeShortTagThe number of ticks the item has been "untouched". After 6000 ticks (5 minutes) the item is destroyed.
ItemCompoundTagThe inventory item, without the Slot tag.

Item Data

Tag NameTag TypeDescription
idShortTagThe item ID.
DamageShortTagThe item's data value, or damage value for tools.
CountByteTagThe number of this item in the stack. Range -128 to 127. Values less then 2 are not displayed in-game.

LocalPlayer

Tag NameTag TypeDescription
InventoryListTagListTag of CompoundTags holding the items in the players inventory.
ScoreIntTagThe player's score.

Inventory Data

Tag NameTag TypeDescription
SlotByteTagThe slot the item is in.
idShortTagThe item ID.
DamageShortTagThe item's data value, or damage value for tools.
CountByteTagThe number of this item in the stack. Range -128 to 127. Values less then 2 are not displayed in-game.

Sheep

Tag NameTag TypeDescription
ShearedByteTag1 or 0 (true/false) - true if the sheep has been shorn.

Additional Tile Entity Tags

Furnace

Tag NameTag TypeDescription
BurnTimeShortTagNumber of ticks left before the current fuel runs out.
CookTimeShortTagNumber of ticks the item has been smelting for. The item finishes when this value reaches 200 (10 seconds). Is reset to 0 if BurnTime reaches 0.

Notes

  1. The index can be calculated with (y × length + z) × width + x

  2. Calculate Pos tag from X, Y, and Z:
    Pos = x + (y << 10) + (z << 20)

    Calculate X, Y, Z from Pos tag:
    x = Pos % 1024
    y = (Pos >> 10) % 1024
    z = (Pos >> 20) % 1024

Contributors

The avatar of contributor named as BJTMastermind BJTMastermind

Changelog

Contributors



Documentation page was setup by DexrnZacAttack.