Structure definition

Not to be confused with Structure file.
This feature is exclusive to Java Edition.
 
There is a related tutorial page for this topic!
 

A structure is a large decoration, covering an area up to 256×256×256 block centered on the structure start. Structures often consist of multiple pieces that are fit together to form the overall structure. They are configured using JSON files within a data pack in the path data/<namespace>/worldgen/structure. To generate in a world, a structure needs to be part of at least one structure set.

JSON format

  • [NBT Compound / JSON Object] The root tag.
    • [String] type: The ID of structure feature type.
    • [String][NBT List / JSON Array] biomes: Any number of biome(s) (an [String] ID, or a [String] tag with #, or an [NBT List / JSON Array] array containing [String] IDs) — Biomes that this structure is allowed to generate in.
    • [String] step: The step where the structure generates. See also the features field in custom biome. Structure features are generated prior to features in the same step. One of raw_generation, lakes, local_modifications, underground_structures, surface_structures, strongholds, underground_ores, underground_decoration, fluid_springs, vegetal_decoration, and top_layer_modification.
    • [String] terrain_adaptation: (Optional, defaults to none) The type of terrain adaptation used for the structure . none for no adaptation, beard_thin is used by pillager outposts and villages, beard_box is used by ancient cities, bury is used by strongholds, and encapsulate is used by Trial Chambers.
    • [NBT Compound / JSON Object] spawn_overrides: (Required, but can be empty. If this object doesn't contain a certain category, the category's spawn setting won't be overridden, and mobs are spawned based on biome.) Overrides the mobs that can spawn in this structure. Used for things like blaze and wither skeleton spawning in nether fortresses, and can also be used to block mobs from spawning like in ancient cities.
      • [NBT Compound / JSON Object] <mob category>: The key must be one of monster, creature, ambient, water_creature, underground_water_creature, water_ambient, misc, or axolotls.
        • [String] bounding_box:Can be piece or full. If full, overrides spawn setting inside the full bounding box of the structure. If piece, only the bounding boxes of all structure pieces.
        • [NBT List / JSON Array] spawns:(Required, but can be empty. If empty, mobs in this category do not spawn.) A list of spawner data objects, one for each mob which should spawn in this structure.
          • [NBT Compound / JSON Object]: The spawner data for a single mob.
            • [String] type: The namespaced entity id of the mob.
            • [Int] weight: How often this mob should spawn, higher values produce more spawns.
            • [Int] minCount: The minimum count of mobs to spawn in a pack. Must be greater than 0.
            • [Int] maxCount: The maximum count of mobs to spawn in a pack. Must be greater than 0. And must be not less than [Int] minCount.
    • Additional fields depending on value of [String] type, see Structure types.

Structure types

Structures use different types. The structure types and their corresponding configuration are listed below:

Using Jigsaw Blocks

Main article: Jigsaw structure

Jigsaw structures are using template pools and jigsaw blocks and allow full customization of structure generation using a datapack.

Using structure templates

These structure types use specific structure templates, but they use hard-coded relative positioning between those structure templates instead of using jigsaw blocks.

Hardcoded structures

These structure types use code to place the blocks of the structure directly.

History

Java Edition
1.1922w11aThe structure system was rewritten.
Renamed "configured structure feature" registry to "structure".
Moved worldgen/configured_structure_feature to worldgen/structure folder.
22w12aAdded max_distance_from_center field to jigsaw structure.
22w13aAdded rottable_blocks field into minecraft:block_rot processor.
Now the integrity field in minecraft:block_rot processor becomes a required field, and now it must be between 0.0 and 1.0 (inclusive).
Replaced the [Boolean] adapt_noise field in configured structure feature with [String] terrain_adaptation field. Before, it is an optional boolean value that defaults to false.
All fields except type of jigsaw structure are now wrapped in a value field.
22w14aReverted the change on jigsaw structure from last snapshot.
Now the rottable_blocks field in minecraft:block_rot processor also accepts a block ID or a list of block IDs, and the block tag now needs to be prefixed with a #.
22w17aAdded [String] start_jigsaw_name field in minecraft:jigsaw config type of configured structure feature.
1.19.322w44aRemoved the [String] name field in structure pool. Before, this field was a required field, but had no effect.
1.19.4Pre-release 1Now [Int] minCount and [Int] maxCount in [NBT Compound / JSON Object] spawners in configured structure feature must be a positive integer. And [Int] maxCount must be not less than [Int] minCount.
1.2023w12aAdded capped processor.
The [NBT Compound / JSON Object] output_nbt field in the rule processor used to set fixed NBT data to the block entity has now been changed to [NBT Compound / JSON Object] block_entity_modifier. Before, [NBT Compound / JSON Object] output_nbt was an NBT compound in JSON object form, see NBT format#JSON and NBT.
1.20.323w42aAdded optional pool_aliases list to jigsaw structures.
Aliases represent the possibility to rewire jigsaw pool connections by redirecting pool references on individual structure instances.
Alias variants are represented in type.
1.21?Added liquid_settings field to structures of jigsaw type

External links

Navigation