Skip to content

BiomeReplacer

JadenXgamer edited this page Jan 23, 2025 · 8 revisions

BiomeReplacer is a versatile tool which allows you to conditionally replace certain biomes in The Overworld and Nether with different ones. it does so with the use of ReplacementRegions that take in values such as Size and Rarity to dynamically swap out one biome for another, this system is fully compatible with other mods which alter MultiNoiseBiomeSource such as Terrablender and shouldn't cause any issues

Usage

you can use ElysiumBiomeRegistry class to add replacements, this class should be called inside of your Forge ServerAboutToStartEvent

your options are either replaceOverworldBiome or replaceNetherBiome

    @SubscribeEvent
    public void onServerAboutToStart(ServerAboutToStartEvent event) {
        RegistryAccess registryAccess = event.getServer().registryAccess();
        ElysiumBiomeRegistry.replaceNetherBiome(Biomes.SOUL_SAND_VALLEY, Biomes.BADLANDS, 0.5, 24, new ResourceLocation(MOD_ID, "example"), registryAccess);
    }
Variable Description Takes In
canReplace the biomes this Replacement Region can override ResourceKey
withBiome the replacement biome that you're trying to add ResourceKey
rarity a double value between 0-1. it defines how rare the Replacement Regions are Double
size the size of this current Replacement Region Integer
id a unique identifier for this Biome Replacer. make sure to give each registered biome a unique id ResourceLocation
registryAccess lastly, you need to pass in a RegistryAccess RegistryAccess

Tip

for size 24-32 is recommended for actual biomes and 16 for sub-biomes but play around with the values until you're satisfied with the placement

Example

that example provided above results in 50% of Soul Sand Valleys being turned into Badlands which are represented by the purple colors on this noise-map. it leaves the other biomes completely untouched letting you functionally have multiple biomes generating in your world that use the same noise parameters with precise control over what it can and cannot replace

image

Future Plans

Important

everything you see down here is subject to change!

Tag-based canReplace

for now only one Biome can be passed into canReplace but in the future tags can be defined in these too to allow replacement of multiple similar biomes

endBiomeReplacer

currently only the Overworld and Nether can be modified through this API, but support for The End is planned

Data-Driven

BiomeReplacer is going to be made Data-Driven to allow modpack creators to use this API to swap biomes out as well

Clone this wiki locally