mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
Close modded engines per level at unload and in a stopped phase
Server stopping used to close engines, mantle and the generation pools while the loader was still draining chunk generation. Stopping now tears down the services only; the engines and pools close at server stopped, a failed level unload is logged instead of aborting the loader's close loop, and a sweep at the next server start or JVM exit covers a loader that skips the stopped event. Upstream:259f88523782a85c26
This commit is contained in:
1 parent
b0f535832e
commit
bed98c417d
9 files changed
+192
-26
No files matched your search
@@ -41,6 +41,7 @@ import net.minecraftforge.event.level.LevelEvent;
|
||||
import net.minecraftforge.event.server.ServerAboutToStartEvent;
|
||||
import net.minecraftforge.event.server.ServerStartedEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.event.server.ServerStoppedEvent;
|
||||
import net.minecraftforge.event.server.ServerStoppingEvent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.loot.IGlobalLootModifier;
|
||||
@@ -82,6 +83,7 @@ public final class IrisForgeBootstrap {
|
||||
ServerStartingEvent.BUS.addListener((ServerStartingEvent event) -> ModdedEngineBootstrap.start(event.getServer()));
|
||||
ServerStartedEvent.BUS.addListener((ServerStartedEvent event) -> ModdedEngineBootstrap.serverStarted(event.getServer()));
|
||||
ServerStoppingEvent.BUS.addListener((ServerStoppingEvent event) -> ModdedEngineBootstrap.stop());
|
||||
ServerStoppedEvent.BUS.addListener((ServerStoppedEvent event) -> ModdedEngineBootstrap.stopped());
|
||||
LevelEvent.Load.BUS.addListener((LevelEvent.Load event) -> {
|
||||
if (event.getLevel() instanceof ServerLevel level) {
|
||||
ModdedEngineBootstrap.levelLoaded(level);
|
||||
|
||||
Reference in new issue
Block a user