Understanding Modifiers
Modifiers are JSON-defined objects that apply changes to worldgen registries at runtime. Each modifier type targets specific aspects of world generation:- Surface Rules: Control block placement at different heights and biomes
- Features: Stack or modify terrain features like trees and ores
- Template Pools: Add custom structure pieces to jigsaw structures
- Structure Sets: Add structures to generation sets
- Density Functions: Modify terrain shape calculations
Creating Your First Modifier
Choose a modifier type
Each modifier has a
type field. Available types include:lithostitched:add_surface_rulelithostitched:stack_featurelithostitched:add_template_pool_elementslithostitched:add_structure_set_entrieslithostitched:wrap_density_function
Surface Rule Modifiers
Surface rules determine which blocks appear at different depths and conditions. Useadd_surface_rule to inject custom surface rules.
Basic Surface Rule Example
Multi-Level Surface Rules
Stacking Features
Thestack_feature modifier wraps existing configured features with additional placed features, allowing you to add decorations on top of existing generation.
Basic Feature Stacking
Placement Types
Theplacement_type field controls how feature placement behaves:
never_cancel: Always places all features regardless of successcancel_on_failure: Stops if base feature fails (default)cancel_on_success: Stops if base feature succeeds
Example: Adding Flowers to Trees
Template Pool Modifiers
Add custom structure pieces to Minecraft’s jigsaw structures like villages and pillager outposts.Adding Pool Elements
Using Tags for Multiple Pools
Structure Set Modifiers
Add structures to existing structure sets to control their spacing and placement.Density Function Modifiers
Wrap existing density functions to modify terrain shape and cave generation.Best Practices
Use appropriate priorities
Use appropriate priorities
- Surface rules: 900-1100
- Feature modifications: 1000-1200
- Structure modifications: 800-1000
- Use lower priorities for foundational changes
- Use higher priorities for refinements
Use tags for flexibility
Use tags for flexibility
Test in isolation
Test in isolation
Create test worlds with only your modifier active to verify behavior before combining with other modifications.
Document your changes
Document your changes
Add comments (in a separate file) explaining what each modifier does and why, especially for complex surface rules or density functions.
Common Patterns
Conditional Surface Rules
Combine multiple conditions for precise control:Gradual Transitions
Use noise conditions for natural-looking transitions:Troubleshooting
Modifier not applying
- Check file location:
data/namespace/lithostitched/worldgen_modifier/ - Verify JSON syntax is valid
- Ensure priority allows execution order
- Check that target resources exist
Conflicts with other mods
- Adjust priorities to control execution order
- Use tags instead of direct references
- Consider using
appendfields where available - Test compatibility in isolated environments
Performance issues
- Minimize complex density function wrapping
- Use efficient surface rule conditions
- Avoid stacking too many features
- Profile with timing reports
Unexpected generation
- Check surface rule condition order
- Verify biome and dimension filters
- Test with vanilla worldgen for comparison
- Enable debug logging for modifier application
Next Steps
Custom Structures
Learn how to create complete custom structures with template pools
Bandlands Terrain
Create banded terrain patterns like Mesa biomes
Common Patterns
Explore common use cases and best practices
API Reference
Complete reference for all modifier types
