Underground Feature Configuration
Carve a depth-bounded region with its own rock, ores, and structures into cave or surface world generation.
An underground feature carves out a depth-bounded region (e.g. a glowing cavern biome) with its own surface/wall block overrides, ore/structure/static-object spawns, and optional secondary cave shape — independent from a world builder’s own top-level cave generation. Features are referenced by name from a World Builder Configuration preset’s global-underground-features list (or from a biome’s own underground-features list, applying only within that biome).
File Location
Unlike other catalog files, underground features are not referenced from your mod’s manifest — every YAML file in a fixed folder is scanned and loaded automatically:
mods/<YourMod>/underground-features/<name>.yaml
Each file is a single feature (no wrapping list).
Minimal Example
name: my_underground_feature
min-altitude: -200
max-altitude: -20
This registers a feature spanning world-Y -200 up to -20, using every field’s default otherwise (no ore/structure/static-object spawns, all block layers defaulting to air).
Full Field Reference
name: my_underground_feature # Required
min-altitude: -200 # Required. Lower (deeper) world-Y bound
max-altitude: -20 # Required. Upper (shallower) world-Y bound; must be > min-altitude
zone-generator: # Optional. Which algorithm shapes the feature's own boundary
type: warped_octaves # `warped_octaves` (default) or `warped_simplex`
noise-scale: 0.004
noise-threshold: 0.6
warp-scale: 0.003
warp-strength: 0.0
surface-block: YourMod:my_block # Optional. Namespaced automatically if unqualified
block-layers: # Optional. Any layer you omit defaults to Creation:air
- layer: 0
block: YourMod:my_wall_block
- layer: 1
block: YourMod:my_block
ores: # Optional. Names from ore-config.yaml
- YourMod:my_ore
structures: # Optional. Names from structure-config.yaml
- YourMod:my_structure
static-object-spawns: # Optional. Names of registered trees/interactables
- YourMod:my_interactable
cave-generator: # Optional. Open space carved *inside* the feature
type: simplex_threshold # `simplex_threshold` (pockets) or `channel` (one tube)
noise-scale: 0.020
noise-threshold: 0.45
flood: # Optional. Standing water filling the carve
block: water
to-altitude: -500
fishing-water-type: YourMod:my_water
| Field | Required | Default | Description |
|---|---|---|---|
name | Yes | — | Feature identifier. Registered as ModName:name. |
min-altitude | Yes | — | Lower (deeper) world-Y bound of the feature’s vertical range. Usually negative (underground), but these are plain world-Y values — a feature can sit at positive altitude too (e.g. a hollow inside a sky island). |
max-altitude | Yes | — | Upper (shallower) world-Y bound. Must be greater than min-altitude, or the whole feature fails to load. Ascending like every other vertical band in the schema. |
zone-generator | No | warped_octaves with defaults | Which algorithm decides the feature’s extent, and its tuning — see Boundary shape. |
surface-block | No | (none) | Block placed where the feature’s own carved space meets open air (e.g. cave floor). Namespaced to your mod automatically if written without a colon. |
block-layers | No | (all air) | A list of {layer, block} entries filling the feature’s interior. layer is a layer index from 0 up to the world’s configured layer count; a layer the list doesn’t name defaults to Creation:air. Naming a layer the world doesn’t have, or the same layer twice, fails the entry. |
ores | No | (none) | Ore names (from Ore Configuration) that can spawn within this feature. |
structures | No | (none) | Structure names (from Structure Configuration) that can spawn within this feature. |
static-object-spawns | No | (none) | Names of registered trees/interactables that can spawn within this feature. An object can anchor to a cave ceiling or wall (hanging vines, roots, stalactites) rather than the floor via its own attach field — this is the only spawn path that honors attach, and it requires a cave-generator to carve the open space to attach to. |
cave-generator | No | (no interior caves) | Open space carved inside the feature — scattered pockets or one winding tube. See Interior shape. |
flood | No | (dry) | Standing water filling whatever the feature carves, up to a level. See Flooding. |
A malformed or missing optional field falls back to its own default independently — it doesn’t fail the whole feature. Only name, min-altitude, and max-altitude are load-bearing.
Boundary shape
A feature’s extent is decided by one of two algorithms, named by zone-generator’s type:
type | Fields | What it does |
|---|---|---|
warped_octaves (default) | noise-scale, noise-threshold, warp-scale, warp-strength | Multi-octave domain-warped noise plus a rotated-quadrant term, thresholded. warp-strength: 0.0 disables warping for a regular boundary; higher values distort it into an organic shape. |
warped_simplex | noise-scale, noise-threshold | A thresholded simplex sum with warped coordinates and a per-block texture jitter, giving a jagged cave-wall-like edge. |
Omitting zone-generator entirely is warped_octaves with every default.
This used to be an untagged either/or, and that’s what the
typefixes. The two systems were selected by presence: the analytic fields sat bare at the feature’s top level (noise-scale-x,noise-threshold,warp-scale,warp-strength), and adding azone-grid-optionsblock silently replaced all of them at once. Nothing in the file said which was in effect, so the shippedglow_cave.yamlcarried a hand-written comment explaining it. Both are nowtypevalues of one block, so setting fields the active algorithm can’t use is a load error rather than a silent no-op.
noise-scale-yis gone. It was documented as a per-axis frequency, and both sample sites read the x scale for both axes — it never did anything. Use the singlenoise-scale.
Caveat: only the ground-terrain and cave-dimension paths consult
warped_simplex. The sky-island overlay path always evaluates the analytic form, so a feature attached to a sky-island biome and set towarped_simplexis shaped bywarped_octavesdefaults instead. Give such a feature an explicitwarped_octavesgenerator.
Interior shape
cave-generator’s own type picks how the feature’s interior is opened up:
type | Fields | What it does |
|---|---|---|
simplex_threshold (what every feature used before) | noise-scale, noise-threshold | A thresholded simplex evaluated per block — scattered pockets and chambers through the zone. |
channel | noise-scale, amplitude, radius-min, radius-max | One winding tube: a centreline in Y sampled along X, with a bore that widens and narrows. Connective rather than pocketed — a passage that threads the strata instead of a chamber that sits in it. |
A channel’s centreline wanders by up to amplitude blocks from the middle of the feature’s band, and
the whole bore is kept inside min-altitude/max-altitude — an amplitude larger than the band makes
the tube meander along the band’s inner edge rather than leave it.
Mind the zone under a channel. A feature is carved only where its
zone-generatorsays the feature is, and the zone settings that suit a pocket feature — a blobby region with chambers in it — will chop a channel into fragments, because the tube only exists where the blob happens to cover it. Measured on the shipped terrain, a channel under awarped_simplexzone atnoise-threshold: 0.35is carved in about a fifth of its columns. If you want a passage that can actually be followed, give a channel a permissive zone (a low threshold, andwarped_octaveswithwarp-strength: 0.0for an unwarped boundary) over a narrow band. The trade is that the feature then owns most of that band: itsblock-layersreplace the rock there and ordinary caves are suppressed inside it.
| Field | Required | Default | Description |
|---|---|---|---|
noise-scale | No | 0.004 | Centreline wavelength along X. Smaller meanders more slowly. |
amplitude | No | 60 | How far the centreline swings from the band’s middle, in blocks. |
radius-min | No | 2 | Narrowest bore, in blocks. |
radius-max | No | 5 | Widest bore. Raised to radius-min if lower. |
Flooding
flood fills whatever the feature carved, up to to-altitude, with a fluid block. It works with
either interior shape: on simplex_threshold it gives flooded chambers, and on a channel whose
centreline crosses the flood level it gives sumps — submerged stretches you have to swim, with
air pockets where the tube rises back above the water.
| Field | Required | Default | Description |
|---|---|---|---|
block | Yes | — | The fluid block to fill with. |
to-altitude | Yes | — | World-Y of the water surface. Carved cells at or below it are water; above it, air. |
fishing-water-type | No | (the block’s biome) | Fishing water type this feature’s water answers with. A feature threading several depth bands would otherwise change catch table partway along one body of water. |
Two things fail the whole feature rather than loading a broken one, because both would generate something the config says is holding water when it is not:
floodwith nocave-generator— there is nothing carved to fill.floodwhose layer-1 block is air — the feature has no wall to hold the water in.
A flooded feature also insets its carve by one cell from its own boundary: a cell whose lower or
side neighbour falls outside the feature stays solid. That is what lets the water be placed as full,
sealed cells instead of being spread by the flood fill, which would run it out through whatever the
cave pass left next door. It applies only when flood is present, so adding it is the only thing that
can change a feature’s shape.
The water does not move. The fluid simulation conserves volume and has no source blocks, so a flooded channel is still water at a level, not a running one, and no waterfall inside it persists. Traversal along it is a current — persistent AoE zones — not the simulation.
Complete Example
Based on the real shipped glow_cave feature — its boundary uses warped_simplex and its interior caves the per-block threshold (see Boundary shape above):
name: glow_cave
min-altitude: -2000
max-altitude: -20
surface-block: glow_rock
block-layers:
- layer: 0
block: stone_wall
- layer: 1
block: glow_rock
ores:
- coal_ore
zone-generator:
type: warped_simplex
noise-scale: 0.001
noise-threshold: 0.35
# Interior caves carved through the zone.
cave-generator:
type: simplex_threshold
noise-scale: 0.020
noise-threshold: 0.30
Last updated