Structure file

From Minecraft Wiki
Jump to navigation Jump to search
This article is about the format used by structure blocks. For the similar format used by many community programs, see Schematic file format.

A structure file (also called structure template) is an NBT file that stores small structures of blocks and entities. Structure files are used to store some structures such as end cities, igloos and fossils.

Usage[edit | edit source]

Java Edition[edit | edit source]

Structure files are stored as .nbt files in data packs in the File directory.png: Sprite image for directory in Minecraft data/<namespace>/structure folder.

They can be saved and loaded using the Structure Block. When saved from Structure Blocks they are saved into the generated/<namespace>/structures subfolder in the world save folder. When no namespace is given, then the minecraft namespace is used.

Structure files can also be placed using the /place template command. They are also used during the generation of some Structures and of Fossil features.

Prebuild structures[edit | edit source]

Bedrock Edition[edit | edit source]

Structure files are stored using the NBT format in the game files. In behavior packs, they are stored as .mcstructure files in in the <namespace>/structures folder.

Prebuild structures[edit | edit source]

NBT structure[edit | edit source]

All the specified positions are relative to the block located toward -X, -Y, -Z.

  • The root tag.
    •  DataVersion: Data version of the NBT structure.
    •  author: Name of the player who created this structure. Only exists for structures saved before 1.13.
    •  size: 3 TAG_Int describing the size of the structure.
    •  palette: Set of different block states used in the structure.
      • A block.
        •  Name: Block ID.
        •  Properties: List of block state properties.
          •  <state property name>: The value of the corresponding state property.
    •  palettes: Sets of different block states used in the structure, a random palette gets selected based on coordinates. Used in vanilla by shipwrecks.
      • A set of different block states used in the structure.
        • A block.
          •  Name: Block ID.
          •  Properties: List of block state properties.
            •  <state property name>: The value of the corresponding state property.
    •  blocks: List of individual blocks in the structure.
      • An individual block.
        •  state: Index of the block in the palette.
        •  pos: 3 TAG_Int describing the position of this block.
        •  nbt: NBT of the associated block entity (optional, only present if the block has one). Does not contain x, y, or z fields. See Block entity format.
    •  entities: List of entities in the structure.
      • An entity.
        •  pos: 3 TAG_Double describing the exact position of the entity.
        •  blockPos: 3 TAG_Int describing the block position of the entity.
        •  nbt: NBT of the entity (required). See entity format.


History[edit | edit source]

Java Edition
1.11Removed  version that was always set to one
Added  DataVersion that is set to the data version of the version of the game that saved the file.
1.2124w21aMoved structure files from File directory.png: Sprite image for directory in Minecraft structures to File directory.png: Sprite image for directory in Minecraft structure.

Navigation[edit | edit source]