Structure file

(Redirected from Structure block file format)
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 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.

  • [NBT Compound / JSON Object] The root tag.
    • [Int] DataVersion: Data version of the NBT structure.
    • [String] author: Name of the player who created this structure. Only exists for structures saved before 1.13.
    • [NBT List / JSON Array] size: 3 TAG_Int describing the size of the structure.
    • [NBT List / JSON Array] palette: Set of different block states used in the structure.
      • [NBT Compound / JSON Object] A block.
        • [String] Name: Block ID.
        • [NBT Compound / JSON Object] Properties: List of block state properties.
          • [String] <state property name>: The value of the corresponding state property.
    • [NBT List / JSON Array] palettes: Sets of different block states used in the structure, a random palette gets selected based on coordinates. Used in vanilla by shipwrecks.
      • [NBT List / JSON Array] A set of different block states used in the structure.
        • [NBT Compound / JSON Object] A block.
          • [String] Name: Block ID.
          • [NBT Compound / JSON Object] Properties: List of block state properties.
            • [String] <state property name>: The value of the corresponding state property.
    • [NBT List / JSON Array] blocks: List of individual blocks in the structure.
      • [NBT Compound / JSON Object] An individual block.
        • [Int] state: Index of the block in the palette.
        • [NBT List / JSON Array] pos: 3 TAG_Int describing the position of this block.
        • [NBT Compound / JSON Object] 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.
    • [NBT List / JSON Array] entities: List of entities in the structure.
      • [NBT Compound / JSON Object] An entity.
        • [NBT List / JSON Array] pos: 3 TAG_Double describing the exact position of the entity.
        • [NBT List / JSON Array] blockPos: 3 TAG_Int describing the block position of the entity.
        • [NBT Compound / JSON Object] nbt: NBT of the entity (required). See entity format.


History[edit | edit source]

[hide]Java Edition
1.11Removed [Int] version. Before its removal, its value was always 1.
Added [Int] 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]