- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Sub‐Biome Placement
        gniftygnome edited this page Mar 27, 2024 
        ·
        22 revisions
      
    Adding a sub-biome requires the relevant dimension key, the biome key of the target biome to replace, the biome key of the biome to replace it with, and a sub-biome matcher indicating the conditions for replacement of the target biome. Sub-biomes can target replacement biomes as well as vanilla/data biomes.
- Methods:  addSubOverworld,addSubNether,addSubEnd
- See also: sub-biome matcher
// Adding Old Growth Pine Taiga as a sub-biome in the noise-based center of the Desert biome.
BiomePlacement.addSubOverworld(
        BiomeKeys.DESERT,
        BiomeKeys.OLD_GROWTH_PINE_TAIGA,
        SubBiomeMatcher.of(Criterion.ofMax(
                CriterionTargets.CENTER,
                CriterionTypes.RATIO,
                0.2f)));
// Adding our End midlands biome adjacent to its matching highlands biome.
BiomePlacement.addSubEnd(
        BiomeKeys.END_MIDLANDS,
        midlands,
        SubBiomeMatcher.of(SubBiomeMatcher.Criterion.ofAlternate(
                SubBiomeMatcher.CriterionTargets.ALTERNATE,
                highlands,
                BiomeKeys.END_HIGHLANDS,
                false)));
// Adding a forest clearing sub-biome to a forest, based on PV noise.
BiomePlacement.addSubOverworld(
        myforest,
        myclearing,
        SubBiomeMatcher.of(SubBiomeMatcher.Criterion.ofMin(
                SubBiomeMatcher.CriterionTargets.PEAKS_VALLEYS,
                SubBiomeMatcher.CriterionTypes.DISTANCE,
                0.05d)));- Multiple sub-biomes can be specified in the sub_biomeslist.
- See also: sub-biome matcher
- Adding Old Growth Pine Taiga as a sub-biome in the noise-based center of the Desert biome.
{
  "sub_biomes": [
    {
      "dimension": "minecraft:overworld",
      "target": "minecraft:desert",
      "biome": "minecraft:old_growth_pine_taiga",
      "matcher": {
        "criteria": [
          {
            "target": "center",
            "type": "ratio",
            "max": 0.2
          }
        ]
      }
    }
  ]
}- Adding our End midlands biome adjacent to its matching highlands biome.
{
  "sub_biomes": [
    {
      "dimension": "minecraft:the_end",
      "target": "minecraft:end_midlands",
      "biome": "mymod:my_midlands",
      "matcher": {
        "criteria": [
          {
            "target": "alternate",
            "type": "biome",
            "biome": "mymod:my_highlands",
            "secondary": "minecraft:end_highlands"
          }
        ]
      }
    }
  ]
}- Adding a forest clearing sub-biome to a forest, based on PV noise.
{
  "sub_biomes": [
    {
      "dimension": "minecraft:overworld",
      "target": "mymod:forest",
      "biome": "mymod:forest_clearing",
      "matcher": {
        "criteria": [
          {
            "target": "peaks_valleys",
            "type": "distance",
            "min": 0.05
          }
        ]
      }
    }
  ]
}