DelegatingPoolElement
TheDelegatingPoolElement wraps any vanilla pool element and adds advanced features like depth restrictions, placement limits, and custom conditions.
Configuration Fields
Must be
"lithostitched:delegating"The underlying pool element that handles actual structure placement. Can be any vanilla pool element type (single, list, feature, legacy, empty).
Optional identifier for this pool element. Used for tracking and debugging. If not provided, a generated name is used.
Restricts this element to specific depth levels in the structure generation tree. Uses an inclusive range format.This example only allows placement at depths 0-3 (inclusive).
Number of instances to force placement before other pieces are considered. These pieces are prioritized in the shuffling algorithm.
Maximum number of instances of this element that can be placed in a single structure.
Custom placement condition that must be satisfied for this element to spawn. See Placement Conditions for available types.
If true, allows this piece’s bounding box to collide with other pieces.
If true, allows other pieces to intersect with this piece.
Overrides the structure’s terrain adjustment setting for this specific piece. Valid values:
"none""bury""beard_thin""beard_box""encapsulate"
Example: Limited Depth
Restrict a special room to only appear in the first 2 levels of a structure:Example: Forced Placement
Guarantee a specific piece appears multiple times:Example: Conditional Placement
Only place a piece if specific biome conditions are met:Template Pool Structure
Lithostitched-enhanced template pools follow the vanilla structure with additional element types:Template Shuffling
Lithostitched uses a custom weighted shuffling algorithm (LithostitchedTemplates) that:
- Assigns a random weight to each element based on its configured weight
- Prioritizes elements with
forced_countset (given a -2 weight offset) - Sorts by calculated random weight:
-pow(random, 1/weight) + (prioritized ? -2 : 0)
- Higher weights are more likely to appear earlier in the shuffled list
- Forced elements appear before all other elements
- Randomization while maintaining weight distribution
The shuffling algorithm is defined in
LithostitchedTemplates at /home/daytona/workspace/source/src/common/main/java/dev/worldgen/lithostitched/worldgen/structure/LithostitchedTemplates.java:68Best Practices
Use depth restrictions for structure variety
Use depth restrictions for structure variety
Restrict rare or special rooms to specific depths to create more interesting dungeon layouts:
Limit unique pieces with max_count
Limit unique pieces with max_count
Prevent overwhelming the structure with special rooms:
Combine conditions for precise control
Combine conditions for precise control
Use multiple conditions to create highly specific placement rules:
Related
Pool Elements
Learn about other pool element types
Processors
Transform blocks during placement
Placement Conditions
Control when elements spawn
Pool Aliases
Dynamic pool substitution
