Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/More-RPG-Classes/llms.txt

Use this file to discover all available pages before exploring further.

Structure processors modify how structures are placed in the world, allowing them to adapt to the surrounding terrain and environment.

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
These processors are registered in ModStructureProcessorTypes and are particularly useful for creating paths and structures that adapt to diverse terrain conditions.

TerrainBlendingProcessor

Registry ID: more_rpg_classes:terrain_blending
Source: 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

{
  "processor_type": "more_rpg_classes:terrain_blending",
  "blend_block": "minecraft:grass_block",
  "sample_radius": 2,
  "fallback_block": "minecraft:grass_block",
  "match_below": true,
  "match_horizontal": true,
  "variation_chance": 0.15
}

Parameters

ParameterTypeDefaultDescription
blend_blockString-The block to replace (e.g., “minecraft:grass_block”)
sample_radiusInteger2Radius for sampling surrounding terrain
fallback_blockString"minecraft:grass_block"Block to use if no suitable terrain is found
match_belowBooleantrueWhether to match the block directly below
match_horizontalBooleantrueWhether to match horizontally adjacent blocks
variation_chanceDouble0.15Chance (0.0-1.0) to add block variation

How It Works

  1. Terrain Sampling: Samples blocks within the specified radius, with closer blocks weighted more heavily
  2. Water Detection: Checks for water below and removes blocks that would float unsupported
  3. Block Selection: Selects the most common terrain block from the sample
  4. 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_adaptation
Source: 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

{
  "processor_type": "more_rpg_classes:path_adaptation",
  "filler_block": "minecraft:pink_concrete",
  "terrain_mappings": [
    {
      "terrain": "#minecraft:sand",
      "output": "minecraft:smooth_sandstone"
    },
    {
      "terrain": "minecraft:grass_block",
      "output": "minecraft:dirt_path"
    }
  ],
  "water_output": "minecraft:oak_planks",
  "stop_on_water": true,
  "water_check_radius": 3,
  "water_threshold": 0.25,
  "remove_floating_blocks": true
}

Parameters

ParameterTypeDefaultDescription
filler_blockString-The block to be replaced with terrain-adapted blocks
terrain_mappingsArray-List of terrain-to-output block mappings
water_outputString-Block to place when water is detected below
stop_on_waterBooleantrueStop path generation at jigsaw blocks when water is ahead
water_check_radiusInteger3Radius to check for water ahead
water_thresholdDouble0.25Proportion of water blocks needed to trigger stop (0.0-1.0)
remove_floating_blocksBooleantrueRemove 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

  1. Filler Block Processing: Replaces filler blocks based on the terrain below
  2. Water Detection: Places water_output block when water is below
  3. Terrain Matching: Iterates through terrain_mappings to find matching terrain
  4. Floating Block Removal: Removes blocks without solid ground support if enabled
  5. Jigsaw Control: Removes jigsaw blocks when water is detected ahead (prevents path from continuing)

Helper Methods

// Check if a block state is water
public static boolean isWaterAt(BlockState state)

// Check if a block is solid terrain
public static boolean isSolidTerrain(BlockState state)

WaterPillarProcessor

Registry ID: more_rpg_classes:water_pillar
Source: 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

{
  "processor_type": "more_rpg_classes:water_pillar",
  "corner_block": "minecraft:pink_concrete",
  "pillar_block": "minecraft:oak_log",
  "fence_block": "minecraft:oak_fence",
  "max_pillar_depth": 32,
  "terrain_mappings": [
    {
      "terrain": "minecraft:grass_block",
      "output": "minecraft:dirt_path"
    }
  ],
  "fallback_block": "minecraft:dirt_path",
  "sample_radius": 2,
  "blend_with_terrain": true
}

Parameters

ParameterTypeDefaultDescription
corner_blockString-The block that triggers pillar generation
pillar_blockString-Block to use for the pillar
fence_blockString-Block to place above the corner when a pillar is generated
max_pillar_depthInteger32Maximum depth the pillar can extend
terrain_mappingsArray[]List of terrain-to-output block mappings
fallback_blockString"minecraft:dirt_path"Block to use when no terrain mapping matches
sample_radiusInteger2Radius for sampling surrounding terrain when blending
blend_with_terrainBooleantrueWhether to blend corner blocks with surrounding terrain

How It Works

  1. Water Detection: Checks if water exists below the corner block (up to 2 blocks down)
  2. Pillar Generation: When water is detected:
    • Places pillar_block at the corner position
    • Places fence_block one block above the corner
    • Extends pillar downward through water/air until solid ground is reached
  3. 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
  4. Terrain Mappings: Custom mappings are checked before terrain blending

Terrain Sampling

When blend_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:
{
  "processors": [
    {
      "processor_type": "more_rpg_classes:path_adaptation",
      "filler_block": "minecraft:pink_concrete",
      "terrain_mappings": [
        {
          "terrain": "#minecraft:sand",
          "output": "minecraft:smooth_sandstone"
        }
      ],
      "water_output": "minecraft:oak_planks",
      "stop_on_water": true
    },
    {
      "processor_type": "more_rpg_classes:water_pillar",
      "corner_block": "minecraft:yellow_concrete",
      "pillar_block": "minecraft:oak_log",
      "fence_block": "minecraft:oak_fence",
      "max_pillar_depth": 32
    },
    {
      "processor_type": "more_rpg_classes:terrain_blending",
      "blend_block": "minecraft:grass_block",
      "sample_radius": 2,
      "variation_chance": 0.15
    }
  ]
}

Version History

  • v2.5.17 - Added TerrainBlendingProcessor for smoother terrain blending
  • v2.5.16 - Added PathAdaptationProcessor and WaterPillarProcessor for environment-adaptive paths

Build docs developers (and LLMs) love