Overview
Surface modifiers allow you to inject or modify surface rules that control what blocks generate on the surface and underground in different biomes and conditions. This is essential for customizing terrain appearance without modifying biome files.Add Surface Rule
Adds surface rules to specified dimension level stems. Surface rules determine which blocks generate at various heights and conditions.How It Works
Surface rule injection is independent of other modifiers. The modifier stores the rules during application, and they are later merged into the dimension’s noise generation settings during world initialization.Parameters
Must be
"lithostitched:add_surface_rule"Execution priority. Lower values execute first, affecting rule order.
Array of dimension level stem registry IDs to apply the surface rule to.Common values:
"minecraft:overworld""minecraft:the_nether""minecraft:the_end"
A
SurfaceRules.RuleSource object defining the surface rule logic.Supports all vanilla rule types plus Lithostitched extensions:minecraft:sequence- Execute rules in orderminecraft:condition- Conditional rule applicationminecraft:block- Place a specific blockminecraft:bandlands- Bandlands surface patterns (Lithostitched)lithostitched:reference- Reference another surface rule
Examples
Surface Rule Conditions
Lithostitched adds custom surface rule conditions beyond vanilla:Slope Condition
Checks the steepness of terrain at a position.Minimum slope value (0.0 = flat, 1.0 = vertical)
Maximum slope value
Biome Condition
Extended biome matching with tag support.All Of Condition
All conditions must be true.Any Of Condition
At least one condition must be true.Surface Rule Sources
Bandlands Rule
Creates repeating horizontal bands of blocks, similar to badlands biomes.Reference Rule
References another surface rule by registry ID, enabling rule reuse.Priority and Rule Order
Surface rules execute in sequence, with earlier rules taking precedence. Priority affects the order in which modifiers add rules:Best Practices
Use sequence rules for multiple conditions
Use sequence rules for multiple conditions
Wrap multiple rules in a
minecraft:sequence to ensure proper execution order. The first matching rule in the sequence will be applied.Leverage biome tags
Leverage biome tags
Test surface rules visually
Test surface rules visually
- Generate test worlds with F3+G chunk borders visible
- Verify surface blocks at different heights and biomes
- Check transitions between biomes
- Test in different climate zones
Consider performance
Consider performance
- Avoid overly complex condition chains
- Use simpler conditions when possible
- Profile with F3 debug screen if experiencing lag
Reference shared rules
Reference shared rules
Common Use Cases
Custom Biome Surfaces
Define unique surface blocks for custom biomes using biome conditions
Height-Based Layers
Create snow caps, stone cliffs, or other height-dependent surfaces
Slope-Based Terrain
Use slope conditions to generate stone on steep cliffs
Banded Rock Formations
Create badlands-style banded terracotta formations
Technical Details
Application Timing
TheAddSurfaceRuleModifier.applyModifier() method is empty because surface rules are applied differently than other modifiers:
Level Stem Reference
Thelevels parameter uses ResourceKey<LevelStem> rather than direct dimension references:
Related
Surface Conditions
Explore all surface rule condition types
Bandlands System
Learn about bandlands band types
Density Modifiers
Modify terrain shape with density functions
Examples
See practical surface rule examples
