Skip to content

Enhanced Terrain Adaptation

finnsetchell edited this page Aug 15, 2026 · 1 revision

Enhanced terrain adaptation

Reshapes the terrain around each structure piece by adding or removing land with a smooth falloff, instead of vanilla's blocky beard. Use it when a structure needs to sit in the landscape convincingly and vanilla's terrain_adaptation is too crude.

A reduced port of the equivalent feature in YUNG's API (YungNickYoung).

This only works on nether jigsaw structures. The field is only on moogs_structures:moogs_structures_generic_nether_jigsaw_structure, and the terrain hook only looks at structures of that type. Putting it on a regular moogs_structures_generic_jigsaw_structure does nothing, and so do pool element overrides inside one.

Minimal example

From MMR's nether mineshaft, on the structure JSON:

{
  "type": "moogs_structures:moogs_structures_generic_nether_jigsaw_structure",
  "terrain_adaptation": "none",
  "enhanced_terrain_adaptation": {
    "kernel_size": 5,
    "kernel_distance": 5,
    "top": "bury",
    "bottom": "bury",
    "bottom_offset": 1.0,
    "padding": { "x": 1, "top": 1, "bottom": 0, "z": 1 }
  }
}

Set terrain_adaptation to none alongside it. The two systems stack rather than replace, so leaving vanilla's on doubles up the effect.

Fields

Field Type Required Default Notes
kernel_size int yes How far the effect reaches. Reach in blocks is half this, rounded down.
kernel_distance int yes Falloff width. Higher keeps the effect strong further out.
top string yes carve, bury or none, applied above the piece floor.
bottom string yes Same, applied below it.
bottom_offset number no 0 Shifts the affected region up or down. Whole numbers only in practice.
padding object no all zero Grows or shrinks the piece box before adapting. x, top, bottom, z, all int, negatives allowed.
band object no Restricts the effect to a horizontal slab. See below.

carve removes terrain, bury adds it, none leaves it alone.

kernel_size is a hard cutoff and kernel_distance shapes the falloff inside it, so tune them together. Roughly, set kernel_distance near the square of the reach. Prefer odd kernel_size values, since even ones make the kernel lopsided. kernel_size: 1 and kernel_distance: 0 both silently disable the effect.

Note padding.x and padding.z follow the piece's rotation, so on a piece rotated a quarter turn x padding lands on the world Z axis.

Per-piece overrides

The same object can go on an individual pool element, on versioned_single_pool_element, mirroring_single_pool_element or legacy_ocean_bottom_single_pool_element. Vanilla's minecraft:single_pool_element does not accept it.

{
  "weight": 30,
  "element": {
    "element_type": "moogs_structures:versioned_single_pool_element",
    "projection": "rigid",
    "location": "mmr:nether_mineshaft/crossing_1",
    "processors": "mmr:nether_mineshaft_no_basalt",
    "enhanced_terrain_adaptation": {
      "kernel_size": 5,
      "kernel_distance": 4,
      "top": "bury",
      "bottom": "bury"
    }
  }
}

An override replaces the structure's settings for that piece rather than merging, so anything you leave out reverts to its default rather than inheriting. Note this example omits bottom_offset and padding, so that piece gets neither, even though the structure sets both.

Only rigid elements get piece adaptation. A terrain_matching element only affects terrain through its jigsaw junctions.

band

Confines the effect to a slab of the piece instead of its whole height, so a tall corridor can be carved around its floor without disturbing rock far above it.

Field Type Required Notes
bottom int yes Rows above the piece floor where the slab starts. 0 is the floor.
top int yes Where it ends.
piece_heights int array no Only adapt pieces whose height in blocks is exactly one of these.

piece_heights is an exact match on the piece's block height, not a range. Pieces that do not match are skipped entirely, not merely unbanded. That is how you apply a band to corridors of a few known heights while leaving crossings and end caps alone.

Two things to know about band: it disables padding.top and padding.bottom (though x and z still apply), and it turns off smoothing at jigsaw connections for that piece.

Gotchas

  • Nether structures only. Nothing happens on surface structures, and no error is logged.
  • It stacks with vanilla terrain_adaptation. Set that to none unless you specifically want both.
  • Overrides replace, they do not merge. A per-element override that omits padding gets zero padding, not the structure's.
  • bottom_offset truncates toward zero. 1.9 acts as 1, and -1.9 acts as -1.
  • Bigger kernel_size costs memory cubically, since the kernel is a cube of that edge length.

See also

Clone this wiki locally