Skip to main content

Module structure

Module structure 

Source
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’s BoxOctree — 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 a BridgeCrossing, then weighted BFS over bridge/castle pools honoring place-count, prev-piece, and collision constraints. Structure is vertically offset into Y ∈ [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-1 ladder segments, depth ∈ [4, 11]).
jigsaw
Jigsaw assembly. Ports vanilla’s JigsawPlacement BFS: 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 MineshaftPieces DFS: each child’s addChildren runs 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 StructurePlacement hierarchy.
ruined_portal
Ruined portal. Mirrors vanilla’s RuinedPortalStructure.findGenerationPoint RNG 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 StrongholdPieces recursive BFS; produces bounding boxes only (no blocks).
swamp_hut
Swamp hut structure start generation.
utils
Miscellaneous structure utility functions.

Structs§

RuinedPortalProperties
Vanilla ruined-portal piece properties used by processors and postprocess.
StructurePiece
Vanilla’s StructurePiece runtime state.
TemplatePieceData
Template-backed non-jigsaw placement data.

Enums§

ProceduralPieceData
Family-specific state for code-generated structure pieces.
StructureBlockIgnore
Hardcoded vanilla block-ignore processors used by template placement.
StructureMirror
Vanilla Mirror modes used by template placement.
StructurePiecePayload
Type-specific structure-piece placement payload.
TemplateMarkerHandling
Marker handling requested by a template-backed structure piece.
TemplatePlacementAdjustment
Family-specific template position adjustment before block placement.
TemplatePlacementClip
Vanilla bounding box adjustment before calling StructureTemplate.placeInWorld.
TemplatePostProcess
Family-specific post-template processing for template-backed pieces.
TemplateProcessorList
Processors for template-backed non-jigsaw pieces.

Traits§

Structure
Vanilla’s Structure::findValidGenerationPoint. Impls own their RNG order, collision checks, and biome check.