Schematic file format

The .schematic file format was created by users to store sections of a Minecraft world for use with third-party programs (specifically, MCEdit, Minecraft Note Block Studio, Redstone Simulator, and WorldEdit). Schematics are in NBT format and are loosely based on the Indev level format. Indexes for the Blocks and Data arrays are ordered y,z,x - that is, the x coordinate varies the fastest. This is similar to block ordering for Classic and Indev levels.

NBT Structure

 * TAG_Compound("Schematic"): Schematic data.
 * TAG_Short("Width"): Size along the X axis.
 * TAG_Short("Length"): Size along the Z axis.
 * TAG_Short("Height"): Size along the Y axis.
 * TAG_String("Materials"): This will be "Classic" for schematics exported from Minecraft Classic levels, and "Alpha" for those from Minecraft Alpha, Minecraft Beta and Minecraft worlds.
 * TAG_Byte_Array("Blocks"): Block IDs defining the terrain. 8 bits per block.
 * TAG_Byte_Array("Data"): Block data additionally defining parts of the terrain. Only the lower 4 bits of each byte are used.
 * TAG_List("Entities"): Each TAG_Compound in this list defines an entity in the schematic. See the Entity Format for Alpha levels.
 * TAG_List("TileEntities"): Each TAG_Compound in this list defines a tile entity in the schematic. See Tile Entity Format.

Block Format
Blocks are laid out in sets of vertical columns, with the rows going north-south through chunk, and columns going east-west. Blocks in a schematic are accessed via the following method:

unsigned char BlockID = Blocks[ (x) + (z * SchematicWidth) + (y * SchematicHeight * SchematicWidth) ];

The coordinate system is as follows:
 * X increases South, decreases North
 * Y increases upwards, decreases downwards
 * Z increases West, decreases East

Unlike Block_Format, block data uses a full byte for each block. This means you can use the same method to retrieve a particular block for both Blocks and Data.

Format de carte .schematic