Java Edition Indev level format

The .mclevel map format is a new 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.

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 and the other 4 bits the lighting.

The following blocks use extra data:

Lighting


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

Farmland
0x0 is dry land, 0x1 and above is wet. The wetness value depends on how far the block is away from water.

Crops
Crops grow from 0x0 to 0x7.



Torches
Torches use the data to determine their state.

0x0 is the basic straight torch. 0x1 to 0x4 are the torch sticking into a nearby block.



Format de carte .mclevel (NBT)