Structures
Structures are large, complex generated features like villages, temples, strongholds, and dungeons. Unlike simple features (trees, ores), structures can span multiple chunks and consist of interconnected pieces assembled using the jigsaw system.
Structure Generation Pipeline
Structure generation involves four interconnected components:
- Processor list - Modifies blocks when placing structure pieces (aging, randomization, gravity adjustment)
- Template pool - Defines weighted collections of structure pieces that can connect via jigsaw blocks
- Configured structure - Specifies the structure type, starting pool, biome restrictions, and terrain adaptation
- Structure set - Controls world-scale placement: spacing between structures, clustering, and exclusion zones
Structures generate during the structures_starts step, before terrain features. This allows terrain to adapt around structures rather than structures cutting through terrain.
References: Structure, Structure definition, Structure set, Template pool, Processor list
Processor List
Processor lists transform blocks when structure pieces are placed. They enable effects like aging (cracked bricks, mossy stone), randomization (varied block types), and terrain adaptation (gravity for surface structures).
Reference: Processor list
Common Processors
| Processor | Description |
|---|---|
block_rot |
Randomly rotates blocks |
block_ignore |
Ignores certain blocks during placement |
block_age |
Ages blocks (cracks, moss) |
gravity |
Adjusts Y position to terrain |
rule |
Replaces blocks based on rules |
protected_blocks |
Prevents certain blocks from being replaced |
capped |
Limits processor applications |
Template Pool
Template pools define weighted collections of structure pieces for jigsaw structures. The jigsaw system connects pieces by matching jigsaw block names, allowing modular structure assembly. Each pool can reference other pools for recursive generation (e.g., village houses connecting to streets connecting to more houses).
Reference: Template pool
Pool Elements
Projection Types
| Type | Description |
|---|---|
RIGID |
Maintains original shape |
TERRAIN_MATCHING |
Adapts to terrain height |
Configured Structure
Configured structures define the structure type, starting template pool, biome restrictions, generation step, and terrain adaptation settings. The structure type determines the generation algorithm (jigsaw assembly, single piece, or specialized logic).
Reference: Structure definition
Structure Types
Common structure types include:
jigsaw- Modular structures using template poolsburied_treasure- Single buried chestdesert_pyramid- Desert templeend_city- End cityfortress- Nether fortressigloo- Igloo with optional basementjungle_temple- Jungle templemineshaft- Underground mineshaftmonument- Ocean monumentnether_fossil- Nether fossilocean_ruin- Ocean ruinsruined_portal- Ruined portalshipwreck- Shipwreckstronghold- Strongholdswamp_hut- Witch hutwoodland_mansion- Woodland mansion
Structure Set
Structure sets control world-scale placement using a grid-based system. Spacing defines the grid cell size (average distance), while * separation* ensures minimum distance between structures. Multiple structures can share a set with weights for mutual exclusion (only one generates per cell).
Reference: Structure set
Placement Types
Random Spread
The most common placement type. Divides the world into a grid where each cell may contain one structure at a random position. The salt value ensures different structure sets don't align their grids.
Concentric Rings
Places structures in expanding rings around the world origin. Used by strongholds to ensure they're distributed at increasing distances from spawn.
Reference: Structure set - Concentric rings
