Skip to content

Biome Replacement

gniftygnome edited this page Mar 27, 2024 · 14 revisions

Replace Biomes

Replacements require the relevant dimension key, the biome key of the target biome to replace, the biome key of the biome to replace it with, and optionally the proportion of replacement (between 0.0 and 1.0; defaults to 1.0).

A proportion of 1.0 results in complete replacement of the target biome. When multiple replacements target the same biome, the following logic determines the final proportions:

  1. The replaced (target) biome's requested proportion is set to: 1.0 - [largest requested replacement proportion]
  2. All proportions (including target biome's) are scaled: [requested proportion] / [sum of all requested proportions]

Thus if modded biomes X and Y target BiomeKeys.FOREST with proportions 0.8 and 0.5 respectively, the effective division of the Forest biome will be: 0.5333 of biome X, 0.3333 of biome Y, and 0.1333 of Forest.

The order of replacements (and thus the adjacency of biomes) is randomly (based on the seed) determined on the first start of the game, and persisted in the game's saved state. If new biomes are added later, they are appended to the list.

in code

  • Methods: replaceOverworld, replaceNether, replaceEnd
BiomePlacement.replaceOverworld(BiomeKeys.PLAINS, BiomeKeys.WARPED_FOREST, 0.5d);
BiomePlacement.replaceNether(BiomeKeys.WARPED_FOREST, BiomeKeys.END_HIGHLANDS);
BiomePlacement.replaceEnd(BiomeKeys.END_HIGHLANDS, BiomeKeys.PLAINS);

as data

  • Multiple replacements can be specified in the replacements list.
{
  "replacements": [
    {
      "dimension": "minecraft:overworld",
      "target": "minecraft:plains",
      "biome": "minecraft:warped_forest",
      "proportion": 0.5
    },
    {
      "dimension": "minecraft:the_nether",
      "target": "minecraft:warped_forest",
      "biome": "minecraft:end_highlands"
    },
    {
      "dimension": "minecraft:the_end",
      "target": "minecraft:end_highlands",
      "biome": "minecraft:plains"
    }
  ]
}