Overview
The More RPG Library provides three specialized structure processors for creating structures that blend naturally with their environment:- TerrainBlendingProcessor - Blends path structures smoothly with terrain
- PathAdaptationProcessor - Adapts paths to terrain and water
- WaterPillarProcessor - Creates pillars in water and blends with terrain
ModStructureProcessorTypes and are particularly useful for creating paths and structures that adapt to diverse terrain conditions.
TerrainBlendingProcessor
Registry ID:more_rpg_classes:terrain_blendingSource:
net.more_rpg_classes.worldgen.processor.TerrainBlendingProcessor
Description
Makes path structures bend smoother and more naturally to terrain by sampling neighboring blocks and selecting appropriate blocks that fit the environment.Configuration
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
blend_block | String | - | The block to replace (e.g., “minecraft:grass_block”) |
sample_radius | Integer | 2 | Radius for sampling surrounding terrain |
fallback_block | String | "minecraft:grass_block" | Block to use if no suitable terrain is found |
match_below | Boolean | true | Whether to match the block directly below |
match_horizontal | Boolean | true | Whether to match horizontally adjacent blocks |
variation_chance | Double | 0.15 | Chance (0.0-1.0) to add block variation |
How It Works
- Terrain Sampling: Samples blocks within the specified radius, with closer blocks weighted more heavily
- Water Detection: Checks for water below and removes blocks that would float unsupported
- Block Selection: Selects the most common terrain block from the sample
- Variation: Adds natural variation based on
variation_chance:- Grass blocks can become moss or podzol (5-8% chance)
- Dirt becomes grass block
- Stone can become cobblestone, mossy cobblestone, or andesite (15-35% chance)
- Sand can become sandstone or gravel (10-20% chance)
- Snow can become powder snow or ice (15-25% chance)
Supported Terrain Blocks
The processor recognizes these terrain types:- Dirt variants (grass block, dirt, podzol, mycelium, coarse dirt, rooted dirt, farmland)
- Stone types (stone, cobblestone, deepslate, calcite, tuff, dripstone)
- Sand and gravel
- Clay and mud
- Snow and ice
- Terracotta
- Moss block
PathAdaptationProcessor
Registry ID:more_rpg_classes:path_adaptationSource:
net.more_rpg_classes.worldgen.processor.PathAdaptationProcessor
Description
Adapts paths to the environment by detecting terrain and water, transforming filler blocks into appropriate path materials, and stopping path generation when encountering water.Configuration
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
filler_block | String | - | The block to be replaced with terrain-adapted blocks |
terrain_mappings | Array | - | List of terrain-to-output block mappings |
water_output | String | - | Block to place when water is detected below |
stop_on_water | Boolean | true | Stop path generation at jigsaw blocks when water is ahead |
water_check_radius | Integer | 3 | Radius to check for water ahead |
water_threshold | Double | 0.25 | Proportion of water blocks needed to trigger stop (0.0-1.0) |
remove_floating_blocks | Boolean | true | Remove blocks that would float unsupported |
Terrain Mappings
Each terrain mapping consists of:terrain: Block or tag to match (tags start with#, e.g.,"#minecraft:sand")output: Block to place when terrain is matched
How It Works
- Filler Block Processing: Replaces filler blocks based on the terrain below
- Water Detection: Places
water_outputblock when water is below - Terrain Matching: Iterates through
terrain_mappingsto find matching terrain - Floating Block Removal: Removes blocks without solid ground support if enabled
- Jigsaw Control: Removes jigsaw blocks when water is detected ahead (prevents path from continuing)
Helper Methods
WaterPillarProcessor
Registry ID:more_rpg_classes:water_pillarSource:
net.more_rpg_classes.worldgen.processor.WaterPillarProcessor
Description
Creates support pillars when water is detected below corner blocks, ensuring structures remain supported over water. Also blends with surrounding terrain when on land.Configuration
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
corner_block | String | - | The block that triggers pillar generation |
pillar_block | String | - | Block to use for the pillar |
fence_block | String | - | Block to place above the corner when a pillar is generated |
max_pillar_depth | Integer | 32 | Maximum depth the pillar can extend |
terrain_mappings | Array | [] | List of terrain-to-output block mappings |
fallback_block | String | "minecraft:dirt_path" | Block to use when no terrain mapping matches |
sample_radius | Integer | 2 | Radius for sampling surrounding terrain when blending |
blend_with_terrain | Boolean | true | Whether to blend corner blocks with surrounding terrain |
How It Works
- Water Detection: Checks if water exists below the corner block (up to 2 blocks down)
- Pillar Generation: When water is detected:
- Places
pillar_blockat the corner position - Places
fence_blockone block above the corner - Extends pillar downward through water/air until solid ground is reached
- Places
- Terrain Blending: When on land, samples surrounding terrain and selects appropriate block:
- Grass/Dirt → Dirt Path
- Sand → Sandstone
- Red Sand → Red Sandstone
- Stone/Gravel → Cobblestone
- Snow → Packed Ice
- Terrain Mappings: Custom mappings are checked before terrain blending
Terrain Sampling
Whenblend_with_terrain is enabled, the processor:
- Weights the block directly below with priority (weight: 3)
- Samples horizontal neighbors with decreasing weight based on distance
- Selects the most common terrain block type
- Applies smart conversions for common blocks
Usage Example
Combining all three processors for a path structure:Version History
- v2.5.17 - Added TerrainBlendingProcessor for smoother terrain blending
- v2.5.16 - Added PathAdaptationProcessor and WaterPillarProcessor for environment-adaptive paths
Related
- Structure Types - Custom structure types including ConditionalJigsawStructure
- ModStructureProcessorTypes.java