TerrainControl icon indicating copy to clipboard operation
TerrainControl copied to clipboard

Setting wrong ReplaceToBiomeName may cause biome to use wrong saved id

Open bloodmc opened this issue 8 years ago • 1 comments

https://github.com/MCTCP/TerrainControl/blob/master/common/src/main/java/com/khorn/terraincontrol/configuration/ServerConfigProvider.java#L271-L280

So lets say you have 2 biomes : MountainBiome and OceanBiome. MountainBiome is a virtual biome with an id of 500 that sets ReplaceToBiomeName to OceanBiome OceanBiome is a normal biome with an id of 200 that sets ReplaceToBiomeName to Ocean

With the above example, the code would cause MountainBiome's generation id to remain 500 which Forge would store in registry causing a level.dat biome validation error on server startup.

I think it would be more appropriate to throw a RuntimeException in these cases instead of logging a warning. Thoughts?

bloodmc avatar Dec 18 '16 20:12 bloodmc

A RuntimeException is not very nice, but I don't see any other way. Preventing the biome from loading is possible, but would require quite some restructuring of the code.

rutgerkok avatar Dec 19 '16 18:12 rutgerkok