MCTCP / TerrainControl

Minecraft Terrain Generator for SpigotMC and Forge
https://www.spigotmc.org/threads/terraincontrol.37980/
MIT License
230 stars 163 forks source link

Fix crashes after dimension change (forge) #524

Closed lumiru closed 7 years ago

lumiru commented 7 years ago

Fixes #497 and #499

World configuration is sometimes unloaded on dimension change. I do not understand why we need to unload world configuration on world change. It could cause chunk glitches when quit/reload (without closing MC) a solo game.

It may fix #516 too (not sure).

This change has to be modified (remove listener or replace comment by some conditions) but I need explanations to understand why we need to unload TC configuration on some cases (the log I added do not help me to understand why).

rutgerkok commented 7 years ago

It is normally just to save memory - singleplayer needs only one world loaded at a time. Also, if you open up a world again in singleplayer, you would expect the newest settings to be loaded from disk, which is not the case if the world stays loaded.

Nevertheless, I'm accepting this pull request, as it is better than crashing.

If you want, I can give you commit access to TC. I am not familiar at all with Forge, so my code barely works on Forge. Any help would be welcome.