Skip to content

versioned_single_pool_element

finnsetchell edited this page Aug 15, 2026 · 1 revision

versioned_single_pool_element

Picks a different NBT file depending on which Minecraft version is running, from one pool entry. Use it when a piece needs genuinely different content per version: a block that was renamed, an item component format that changed, a feature that does not exist on older versions.

Minimal example

From MBS, where a well was rebuilt for the 1.21.9 block changes:

{
  "weight": 1,
  "element": {
    "element_type": "moogs_structures:versioned_single_pool_element",
    "location": "mbs:1_21_9/dead_forest_well",
    "locations": {
      "1.21-1.21.8": "mbs:dead_forest_well",
      "1.21.9-1.21.11": "mbs:1_21_9/dead_forest_well",
      "26.1-26.2": "mbs:1_21_9/dead_forest_well"
    },
    "processors": "minecraft:empty",
    "projection": "rigid"
  }
}

Fields

Field Type Required Notes
element_type string yes moogs_structures:versioned_single_pool_element
projection string yes rigid or terrain_matching, same as vanilla.
processors processor list yes Same as vanilla. Applies whichever file is chosen.
location resource location no The fallback, used when no range matches. See gotchas.
locations object no Version range to file.
override_liquid_settings string no Same as vanilla.
enhanced_terrain_adaptation object no Per-element terrain adaptation override.

You must give location, locations, or both. Giving neither throws at load.

Version range syntax

Keys are either a single version or a closed range joined by one hyphen. Both ends are inclusive.

Key Matches
1.21.4 Exactly 1.21.4
1.21-1.21.4 1.21 up to and including 1.21.4
26.1-26.2 26.1 up to and including 26.2

There is no open-ended form. 1.21.5+, 1.21.x, >=1.21.5 and 1.21.5- are all errors, and an error in any one key rejects the whole pool file.

Gotchas

  • A bare 1.21 means exactly 1.21.0, not the 1.21 line. Missing parts are treated as zero, so 1.21 does not match 1.21.1. To cover a line, write an explicit range with a max above the highest real version, like 1.21-1.21.99. The same applies to the top of a range: 1.21-1.21.4 will not match a future 1.21.4.1.
  • Put the newest file in location. Ranges need a concrete upper bound, so a new patch release falls out of every range and lands on the fallback. Pointing location at your newest file means a version you have not seen yet still gets something sensible, as the MBS example does.
  • Omitting location makes the first entry in locations the fallback. That works but is implicit, and it depends on key order. Set location explicitly.
  • Overlapping ranges resolve to the first match. There is no narrowest-wins rule. Keep ranges disjoint.
  • Falling back is silent. Nothing is logged unless you turn on debug logging, so a range that stopped matching looks like the wrong piece generating rather than an error.

Related elements

MSL registers two more pool elements, both otherwise vanilla single elements:

  • moogs_structures:mirroring_single_pool_element takes a required mirror field (NONE, LEFT_RIGHT or FRONT_BACK, uppercase) and places the piece mirrored, jigsaw connections included.
  • moogs_structures:legacy_ocean_bottom_single_pool_element skips placing air blocks, leaving existing water and terrain intact, the way ocean monuments behave.

See also

Clone this wiki locally