Java Edition Indev level format

The .mclevel map format is an old map format, created by Notch. It is based on the NBT Format.

The map format is in use since indev version 0.31.

While Alpha (and Infdev) levels use NBT files, they have a very different file format.

For details on the infinite map format, see Alpha Level Format.

=NBT Structure=
 * TAG_Compound("MinecraftLevel"): The root tag.
 * TAG_Compound("About"): Information about the level.
 * TAG_Long("CreatedOn"): The Unix time when the level was created.
 * TAG_String("Name"): The name of the level, always "A Nice World".
 * TAG_String("Author"): The name of the user who created the level.
 * TAG_Compound("Environment"): Information about the environment of the level, which varies based on the map generation settings.
 * TAG_Short("TimeOfDay"): The number of ticks since the start of the level. Affects the day/night cycle.
 * TAG_Byte("SkyBrightness"): The sky light level, 0 to 15.
 * TAG_Int("SkyColor"): The color of the sky.
 * TAG_Int("FogColor"): The color of the fog.
 * TAG_Int("CloudColor"): The color of the clouds.
 * TAG_Short("CloudHeight"): The height of the clouds (Y coordinate).
 * TAG_Byte("SurroundingGroundType"): The Block ID of the "surrounding ground".
 * TAG_Short("SurroundingGroundHeight"): The height of the "surrounding ground".
 * TAG_Byte("SurroundingWaterType"): The Block ID of the "surrounding water".
 * TAG_Short("SurroundingWaterHeight"): The height of the "surrounding water".
 * TAG_Compound("Map"): The actual map data.
 * TAG_Short("Width"): The width of the level.
 * TAG_Short("Length"): The length of the level.
 * TAG_Short("Height"): The height of the level.
 * TAG_List("Spawn"): List of 3 TAG_Shorts for the X, Y, and Z spawn coordinates.
 * TAG_Byte_Array("Blocks"): Width*Length*Height bytes of Block IDs.
 * TAG_Byte_Array("Data"): Width*Length*Height bytes of Block Data and Lighting.
 * TAG_List("Entities"): List of TAG_Compounds for the entities in the level.
 * TAG_Compound: An entity. See Chunk format -> Entity Format. Not all information is relevant to Minecraft Indev. The player has its own entity, shown below as an example.
 * TAG_String("id"): The entity ID. In this case, "LocalPlayer".
 * TAG_List("Pos"): List of 3 TAG_Doubles for the X, Y, and Z position of the player.
 * TAG_List("Rotation"): List of 2 TAG_Floats for the Yaw and Pitch of the player's view.
 * TAG_List("Motion"): List of 3 TAG_Doubles for the X, Y, and Z motion in meters per tick.
 * TAG_Float("FallDistance"): How far the player has fallen.
 * TAG_Short("Health"): The number of hit points the player has. 20 is 10 hearts.
 * TAG_Short("AttackTime"): Number of ticks the player is immune to attacks.
 * TAG_Short("HurtTime"): Number of ticks the player is red from being attacked.
 * TAG_Short("DeathTime"): Number of ticks the player has been dead for - used for controlling the death animation.
 * TAG_Short("Air"): The number of ticks before the player starts to drown. Starts at 300.
 * TAG_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.
 * TAG_Int("Score"): The player's score.
 * TAG_List("Inventory"): List of TAG_Compounds representing the items in the player's inventory.
 * TAG_Compound: An inventory item.
 * TAG_Byte("Slot"): The Slot the item is in.
 * TAG_Short("id"): The Item ID.
 * TAG_Short("Damage"): The item's data value, or damage value for tools.
 * TAG_Short("Count"): The number of this item in the stack. Range -128 to 127. Values less than 2 are not displayed in-game.
 * TAG_List("TileEntities"): List of TAG_Compounds for the tile entities in the level.
 * TAG_Compound: A tile entity.
 * See Chunk format -> Tile Entity Format. Not all information is relevant to Minecraft Indev.

Blocks
The block byte array is used to define the types of blocks that occupy a map. The number of bytes in the array may be calculated by multiplying the dimensions of the map. Y being the up direction rather than Z. For Hex values see Block IDs.

To access a specific block from either the block or data array from XYZ coordinates, use the following formula:

Index = x + (y * Height + z) * Width

Data
The Data byte array is used for lighting and extra block data. The first 4 bit contains the extra block data (also known as metadata) and the other 4 bits the lighting.

For extended information on block metadata, refer to Data values.

Lighting


There are 16 levels of lighting for a block ranging from 0x0 (no light) to 0xF (full light).

Format de carte mclevel (NBT) Формат файлов Minecraft (NBT)