Disabling Traverse variant biomes causes crash
TrueCP6 opened this issue ยท 3 comments
If the weight of any of the variant
biomes in the Traverse config file is set to 0 or they are disabled, Simplex crashes when attempting to generate the world. This problem does not occur with default terrain generation. I am unsure if this is a problem with Simplex or Traverse so I have posted this issue to both repos.
0.7.2 seems to have fixed the crash, but left an extremely strange issue in its place. Non-variant
disabled biomes still continue to generate while disabled variant
biomes do not. Other biomes seem to take the place of these "missing" biomes. Land can generate as minecraft:ocean
and as a result ocean structures generate on land.
I've investigated the issue a bit and I think I know what's going on.
- Disabling the biomes in the Traverse configuration means that they are not registered with the Fabric Biomes API.
- This has a few side effects, including the biomes never being added to the
BuiltinBiomes
ID map. - SimplexTerrain has no way of knowing that these biomes are disabled in the Traverse configuration, and assumes that they are enabled, so it adds them to the Simplex biome generator. It would be good if there was some way to disable certain biomes from being added to the Simplex biome generator, but that is potentially a separate issue.
- When creating its biome layers (lowlands, highlands, etc) Simplex Terrain Generation does not use the
BuiltinBiomes
ID map to convertIdentifier
s toint
s, meaning that it can potentially provide integer biome IDs that are not in theBuiltinBiomes
ID map back to Minecraft. - Furthermore, there is no code to add the used biomes to the
BuiltinBiomes
ID map. The Fabric Biomes API handles this inInternalBiomeUtils::ensureIdMapping
for all biomes registered with OverworldBiomes API. - Minecraft notices that the returned values are not in the
BuiltinBiomes
ID map, and throws the above exception.
It seems like this is an issue in Simplex Terrain Generation. A pretty simple fix is to just add each biome registered with the Simplex biome generator to the BuiltinBiomes
ID map, which would prevent the above exception, however it would not result in the biomes being disabled as expected. That is probably an enhancement that can happen separately.