Expand description
structure Structure start/reference tracking.
Vanilla keeps two per-chunk maps: structureStarts (originating here) and
structuresReferences (pointing at nearby origin chunks). The structure key
is Identifier until a structure registry is added.
Re-exports§
pub use generation::ColumnBlock;pub use generation::GenerationContext;pub use generation::GenerationStub;pub use generation::StructureGenerationContext;pub use generator::FixedStructureBiomeProvider;pub use generator::StructureBiomeProvider;pub use generator::StructureGenerator;pub use generator::StructureGeneratorAssets;pub use generator::StructureLocateCandidate;pub use generator::StructureLocatePlacement;pub use generator::StructureLocatePlan;pub use generator::squared_distance;pub use start::StructureReferenceMap;pub use start::StructureReferenceSet;pub use start::StructureStart;pub use start::StructureStartMap;
Modules§
- box_
octree 🔒 - Spatial index for jigsaw piece bounds. Port of
StructureLayoutOptimizer’sBoxOctree— nearby-box queries instead of scanning every placed piece. - desert_
pyramid - Desert pyramid start generation and piece runtime state.
- end_
city - End city. Vanilla’s
EndCityPieces: recursive template-based piece generation (base → towers → bridges → house towers/ships/fat towers), depth ≤ 8. - fortress
- Nether fortress. Vanilla’s
NetherFortressPieces: start with aBridgeCrossing, then weighted BFS over bridge/castle pools honoring place-count, prev-piece, and collision constraints. Structure is vertically offset intoY ∈ [48, 70]. - generation
- Structure piece generation context.
- generator
- Structure placement/selection engine. Shared structure placement/selection engine.
- igloo
- Igloo: one top piece always, 50% chance of a basement (laboratory +
depth-1ladder segments, depth ∈ [4, 11]). - jigsaw
- Jigsaw assembly. Ports vanilla’s
JigsawPlacementBFS: connects pieces via jigsaw blocks given a start pool + config. Produces typed piece state; block placement runs in a later worldgen stage. - jungle_
temple - Jungle temple structure start generation.
- mansion
- Woodland mansion. Vanilla’s
WoodlandMansionPieces: grid-based layout with template pieces for walls, corridors, rooms, and roofs. - mineshaft
- Mineshaft. Vanilla’s
MineshaftPiecesDFS: each child’saddChildrenruns immediately after creation, before processing the next sibling. - nether_
fossil - Nether fossil: sample a random (x, z) in the chunk and a uniform Y, then walk the base-noise column down until we find air over solid. Fails if the walk reaches sea level.
- ocean_
monument - Ocean monument structure start generation and runtime placement state.
- ocean_
ruin - Ocean ruin: a base piece from a warm/cold × small/large pool, plus — when large and the cluster check passes — a scatter of smaller ruins with collision checks. Warm uses one piece; cold stacks three (brick + cracked + mossy) from the same index.
- piece 🔒
- Runtime structure-piece payload model used by feature-stage placement.
- placement
- Structure placement. Determines which chunks are valid for structure
generation — vanilla’s
StructurePlacementhierarchy. - ruined_
portal - Ruined portal. Mirrors vanilla’s
RuinedPortalStructure.findGenerationPointRNG consumption and persists the selected template-backed piece. - shipwreck
- Shipwreck: picks a random template from the beached (11) or underwater (20) pool,
places at
(chunkMinX, 90, chunkMinZ)with random rotation and pivot(4, 15). - single_
piece - Single-piece buried treasure structure start generation.
- start
- Structure starts and references.
- stronghold
- Stronghold piece generation. Vanilla’s
StrongholdPiecesrecursive BFS; produces bounding boxes only (no blocks). - swamp_
hut - Swamp hut structure start generation.
- utils
- Miscellaneous structure utility functions.
Structs§
- Ruined
Portal Properties - Vanilla ruined-portal piece properties used by processors and postprocess.
- Structure
Piece - Vanilla’s
StructurePieceruntime state. - Template
Piece Data - Template-backed non-jigsaw placement data.
Enums§
- Procedural
Piece Data - Family-specific state for code-generated structure pieces.
- Structure
Block Ignore - Hardcoded vanilla block-ignore processors used by template placement.
- Structure
Mirror - Vanilla
Mirrormodes used by template placement. - Structure
Piece Payload - Type-specific structure-piece placement payload.
- Template
Marker Handling - Marker handling requested by a template-backed structure piece.
- Template
Placement Adjustment - Family-specific template position adjustment before block placement.
- Template
Placement Clip - Vanilla bounding box adjustment before calling
StructureTemplate.placeInWorld. - Template
Post Process - Family-specific post-template processing for template-backed pieces.
- Template
Processor List - Processors for template-backed non-jigsaw pieces.
Traits§
- Structure
- Vanilla’s
Structure::findValidGenerationPoint. Impls own their RNG order, collision checks, and biome check.