Fabric API

Fabric API

108M Downloads

OverworldBiomes.setRiverBiome() does not work for null rivers

maityyy opened this issue ยท 2 comments

commented

According to the Biome API documentation, OverworldBiomes.setRiverBiome(BiomeKeys.MOUNTAINS, null) should remove rivers for the selected biome (in our case, it's MOUNTAINS), however the game crashes: https://pastebin.com/fbyy6704

commented

Maybe this is the reason

Makes sure that the given registry key is mapped in {@link BuiltinBiomes}
commented

The ensureIdMapping looks like something added in 1.16 to automatically fix old mods when the biome registration mechanism changed (i.e. when worldgen got added to datapacks).

It shouldn't be applying this fix to null data.

The only workaround I can see, is to use the internal method that bypasses the validation and the data fix.

net.fabricmc.fabric.impl.biome.InternalBiomeData.getOverworldRivers().put(BiomeKeys.MOUNTAIN, null);