Skip to content

Load Predicates

Apollo edited this page Apr 22, 2026 · 2 revisions

Let's say you wanted to add a rock feature to Terralith's Forested Highlands biome. Your worldgen modifier may look like this:

{
  "type": "lithostitched:add_features",
  "biomes": "terralith:forested_highlands",
  "features": "my_mod:rock",
  "step": "vegetal_decoration"
}

The game will throw an error when loading the pack if Terralith isn't installed because it can't find the terralith:forested_highlands biome. Using load predicates, we can tell the game to simply not load the modifier file if Terralith isn't installed.

Load predicates can be added to most datapack files, but are meant for use with Worldgen Modifiers and Biome Injectors. For example, the above modifier can be fixed like this:

{
  "predicate": {
    "type": "lithostitched:mod_loaded",
    "mod_id": "terralith"
  },
  "type": "lithostitched:add_features",
  "biomes": "terralith:forested_highlands",
  "features": "my_mod:rock",
  "step": "vegetal_decoration"
}

All modifier predicates have a type field, indicating the modifier type to use. Each modifier can add more fields if it needs to. The built-in modifier types are as follows:

  • all_of: Passes if all predicates in the predicates field pass.
  • any_of: Passes if at least one predicate in the predicates field passes.
  • not: Passes if the predicate in the predicate field fails.
  • mod_loaded: Passes if a mod with the mod id in the mod_id field is present.
  • loader: Passes if the modloader's id matches the string in the loader field.
  • pack_format: Passes if the pack format is within the range from the supported_formats field.
  • true: Always passes.

Clone this wiki locally