Advanced Rocketry

Advanced Rocketry

21M Downloads

[BUG] [1.16.5] Server does not shut down properly, leading to world corruption

SamboyCoding opened this issue ยท 2 comments

commented

Version of Advanced Rocketry

1.16.5-2.0.0-16

Have you verified this is an issue in the latest unstable build

  • Y

Version of LibVulpes

1.16.5-1.0.2-27

Version of Minecraft

1.16.5

Does this occur without other mods installed

  • Y

Just LibVulpes and AR

Crash report or log or visualVM (if applicable)

https://gist.github.com/SamboyCoding/e6b4e10c5fc9bd83006732665a31b097

Description of the problem

When saving and quitting in singleplayer, or shutting down a dedicated server, the exception above occurs, and the server doesn't actually stop. This inevitably leads to world corruption as well as not being able to load back into the world in singleplayer.

commented

From discussions in the forge discord, FMLJavaModLoadingContext.get() is null outside of the initial game loading process. On top of that, the line in question, https://github.com/Advanced-Rocketry/AdvancedRocketry/blob/1.16.5/src/main/java/zmaster587/advancedRocketry/atmosphere/AtmosphereHandler.java#L81 is not even required as the handler is never registered to that bus, only to MinecraftForge.EVENT_BUS.

Finally, the forge developers suggest against creating multiple handler instances for the same event, and suggest instead

Just have a global event handler that delegates if necessary

commented

Happens to me too xD