Skip to content

Worldgen Modifier Types

Apollo edited this page Nov 22, 2024 · 9 revisions

Biomes

Features

Structures

Density Functions

Misc


add_biome_spawns

The add_biome_spawns modifier adds mob spawns to biome entries.

{
  "type": "lithostitched:add_biome_spawns",
  "biomes": "#c:swamp",
  "spawners": {
    "type": "minecraft:witch",
    "weight": 450,
    "minCount": 3,
    "maxCount": 3
  }
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the mobs should be added to.
  • spawns: Either a single entry or a list of entries of spawner data. Identical format to spawner data entries in biome files, but mob categories are assigned automatically.

remove_biome_spawns

The remove_biome_spawns modifier removes mob spawns from biome entries.

{
  "type": "lithostitched:remove_biome_spawns",
  "biomes": "#minecraft:is_overworld",
  "mobs": "minecraft:zombie"
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the mobs should be removed from.
  • mobs: Either an entity type, a list of entity types, or an entity type tag that defines what mobs should be removed.

replace_climate

The replace_climate modifier replaces the climate settings of biome entries.

{
  "type": "lithostitched:replace_climate",
  "biomes": [
    "minecraft:savanna",
    "minecraft:savanna_plateau"
  ],
  "climate": {
    "temperature": 2.0,
    "downfall": 0.25,
    "has_precipitation": true
  }
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the modifier should replace the climate of.
  • climate: The climate settings to use for the listed biomes. Contains four fields:
    • temperature
    • downfall
    • has_precipitation
    • temperature_modifier (optional)

replace_effects

The replace_effects modifier replaces the effects setting of biome entries.

{
  "type": "lithostitched:replace_effects",
  "biomes": [
    "minecraft:lush_caves",
    "minecraft:dripstone_caves",
    "minecraft:deep_dark"
  ],
  "effects": {
    "sky_color": 0,
    "fog_color": 0,
    "water_color": 0,
    "water_fog_color": 0
  }
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the modifier should replace the special effects of.
  • effects: The special effects settings to use for the listed biomes. Contains many fields, see the Minecraft wiki's page on biome format for a description of each field.

add_features

The add_features modifier adds placed features entries to biome entries in a given generation step.

{
  "type": "lithostitched:add_features",
  "biomes": "#minecraft:is_overworld",
  "features": "example:ore_ancient_debris",
  "step": "underground_ores"
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the features should be added to.
  • features: Either a placed feature, a list of placed features, or a placed feature tag that defines what features should be added to the specified biomes.
  • step: The generation step that the placed features should be added to. The steps are as follows:
    • raw_generation
    • lakes
    • local_modifications
    • underground_structures
    • surface_structures
    • strongholds
    • underground_ores
    • underground_decoration
    • fluid_springs
    • vegetal_decoration
    • top_layer_modification

remove_features

The remove_features modifier removes placed features entries from biome entries in a given generation step.

{
  "type": "lithostitched:remove_features",
  "biomes": "#minecraft:is_overworld",
  "features": [
    "minecraft:disk_sand",
    "minecraft:disk_gravel",
    "minecraft:disk_clay"
  ],
  "step": "underground_ores"
}
  • biomes: Either a biome, a list of biomes, or a biome tag that defines what biomes the features should be removed from.
  • features: Either a placed feature, a list of placed features, or a placed feature tag that defines what features should be removed from the specified biomes.
  • step: The generation step that the placed features should be removed from.

stack_feature

The stack_feature modifier stacks a placed feature with a given configured feature.

{
  "type": "lithostitched:stack_feature",
  "base_feature": "minecraft:trees_birch_and_oak",
  "stacked_feature": "example:fallen_leaves_birch_and_oak"
}
  • base_feature: The configured feature that the placed feature should stack with.
  • stacked_feature: The placed feature to stack onto the base feature.

add_structure_set_entries

The add_structure_set_entries modifier adds structure entries to a structure set.

{
  "type": "lithostitched:add_structure_set_entries",
  "structure_set": "minecraft:nether_complexes",
  "entries": [
    {
      "structure": "example:village_nether",
      "weight": 3
    }
  ]
}
  • structure_set: The structure set the structure entries should be added to.
  • emtries: A list of structure entries, with the same format as the structures field in structure set files.

remove_structures_from_structure_set

The remove_structures_from_structure_set modifier removes structure from a structure set.

{
  "type": "lithostitched:remove_structures_from_structure_set",
  "structure_set": "minecraft:shipwrecks",
  "structures": [
    "minecraft:shipwreck_beached"
  ]
}
  • structure_set: The structure set the structures should be removed from.
  • structures: A list of structures to remove from the set.

set_structure_spawn_condition

The set_structure_spawn_condition modifier type sets a structure spawn condition onto a structure.

{
  "type": "lithostitched:set_structure_spawn_condition",
  "structure": "minecraft:pillager_outpost",
  "spawn_condition": {
    "type": "lithostitched:height_filter",
    "range_type": "absolute",
    "heightmap": "WORLD_SURFACE_WG",
    "permitted_range": {
      "min_inclusive": 90,
      "max_inclusive": 200
    }
  },
  "append": true
}
  • structure: The structure to attach a spawn condition to.
  • spawn_condition: The spawn condition to put on the structure.
  • append: Whether to append the spawn condition rather than replace any existing ones. Defaults to true.

add_template_pool_elements

The add_template_pool_elements modifier adds template pool elements to a template pools.

{
  "type": "lithostitched:add_template_pool_elements",
  "template_pool": "minecraft:village/plains/houses",
  "elements": [
    {
      "weight": 2,
      "element": {
        "element_type": "minecraft:legacy_single_pool_element",
        "projection": "rigid",
        "location": "minecraft:village/desert/houses/desert_small_house_1",
        "processors": "minecraft:empty"
      }
    }
  ]
}
  • template_pool: The template pool the elements should be added to.
  • elements: A list of template pool elements, with the same format as the elements field in template pool files.

set_pool_element_processors

The set_pool_element_processors modifier sets structure processors directly onto template pool elements.

{
  "type": "lithostitched:set_pool_element_processors",
  "template_pool": "minecraft:village/savanna/houses",
  "locations": "minecraft:village/savanna/houses/savanna_temple_2",
  "processor_list": "example:savanna_decor",
  "append": true
}
  • template_pool: The template pool to target.
  • locations: An optional id or list of ids. Template pool elements that place a structure with an id in this field will be given the processor list. If not present, all pool elements will get the processor list.
  • processor_list: The processor list to add.
  • append: Whether to append the processor list rather than replace any existing processors. Defaults to true.

add_processor_list_processors

The add_processor_list_processors modifier adds structure processors to a processor list.

{
  "type": "lithostitched:add_processor_list_processors",
  "processor_list": "minecraft:farm_plains",
  "processors": [
    {
      "processor_type": "minecraft:rule",
      "rules": [
        {
          "location_predicate": {
            "predicate_type": "minecraft:always_true"
          },
          "input_predicate": {
            "predicate_type": "lithostitched:matching_blocks",
            "blocks": "minecraft:wheat",
            "chance": 0.5
          },
          "output_state": {
            "Name": "example:custom_crop"
          }
        }
      ]
    }
  ]
}
  • processor_list: The processor list the processors should be added to.
  • processors: A list of structure processors to be added to the list.

set_pool_aliases

Only in 1.21 and above!

The set_pool_aliases modifier sets pool alias bindings for a given jigsaw structure.

{
  "type": "lithostitched:add_pool_aliases",
  "structure": "minecraft:trial_chambers",
  "pool_aliases": [
    {
      "type": "minecraft:direct",
      "alias": "minecraft:trial_chambers/spawner/contents/melee",
      "target": "minecraft:trial_chambers/spawner/ranged/stray"
    }
  ],
  "append": true
}
  • structure: The structure to set the pool aliases for. Must be a jigsaw structure, vanilla or Lithostitched!
  • pool_aliases: The list of pool aliases to set for the structure.
  • append: Whether or not to append the pool aliases instead of overriding them. Defaults to true.

wrap_density_function

The wrap_density_function modifier allows wrapping around or replacing a density function.

{
  "type": "lithostitched:wrap_density_function",
  "priority": 1000,
  "target_function": "minecraft:overworld/ridges",
  "wrapper_function": {
    "type": "minecraft:mul",
    "argument1": 2,
    "argument2": {
      "type": "lithostitched:wrapped_marker"
    }
  }
}
  • priority: The priority the modifier takes in wrapping. These modifiers are applied in ascending priority order (low -> high values). Defaults to 1000.
  • target_function: The density function reference to wrap.
  • wrapper_function: The density function to wrap around the target.

wrap_noise_router

The wrap_noise_router modifier allows wrapping around or replacing a noise router entry.

{
  "type": "lithostitched:wrap_noise_router",
  "priority": 1000,
  "target": "temperature",
  "wrapper_function": {
    "type": "minecraft:mul",
    "argument1": 2,
    "argument2": {
      "type": "lithostitched:wrapped_marker"
    }
  }
}
  • priority: The priority the modifier takes in wrapping. These modifiers are applied in ascending priority order (low -> high values). Defaults to 1000.
  • target_function: The noise router field to wrap.
  • wrapper_function: The density function to wrap around the target.

add_surface_rule

The add_surface_rule modifier adds surface rule data to dimension(s).

{
  "type": "lithostitched:add_surface_rule",
  "levels": [
    "minecraft:overworld"
  ],
  "surface_rule": {
    "type": "minecraft:condition",
    "if_true": {
      "type": "minecraft:noise_threshold",
      "noise": "minecraft:surface",
      "min_threshold": -64,
      "max_threshold": -0.55
    },
    "then_run": {
      "type": "minecraft:block",
      "result_state": {
        "Name": "minecraft:deepslate",
        "Properties": {
          "axis": "y"
        }
      }
    }
  }
}
  • levels: A list of dimensions to apply the surface rule to.
  • surface_rule: The surface rule to add to the dimension's surface rules. Surface rules added via worldgen modifiers run before all defined in the noise settings file for the dimension.

no_op

The no_op modifier does nothing. It's primary purpose is to allow worldgen modifiers to be disabled by datapacks.

{
  "type": "lithostitched:no_op"
}

This modifier type has no further fields.