Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting wrong ReplaceToBiomeName may cause biome to use wrong saved id #490

Open
bloodmc opened this issue Dec 18, 2016 · 1 comment
Open

Comments

@bloodmc
Copy link
Collaborator

bloodmc commented Dec 18, 2016

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?

@rutgerkok
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants