Reorganize modloading on the dediserver. This removes the DedicatedServer parameter from the FMLDedicatedServerSetupEvent.

Code for customizing the server instance should be moved to the ServerAboutToStartEvent or similar, where the server instance
is available.

This reorganization means that mods will load fully before the server is even constructed, or the server properties loaded. We also move the EULA right to the front so we don't have to wait for bootstrap.

This should fix the problems with mods which customize world data and other things.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2020-06-29 22:09:37 -04:00
1 parent d5aa0c4a91
commit 99e7fad655
6 files changed
+62 -74

No files matched your search

@@ -40,7 +40,7 @@ public enum SidedProvider
()-> { throw new UnsupportedOperationException(); }),
SIDED_SETUP_EVENT(
(Function<Supplier<Minecraft>, Function<ModContainer, Event>>)c-> mc->new FMLClientSetupEvent(c, mc),
s-> mc->new FMLDedicatedServerSetupEvent(s, mc),
s-> mc->new FMLDedicatedServerSetupEvent(mc),
()-> { throw new UnsupportedOperationException(); }),
STRIPCHARS(
(Function<Supplier<Minecraft>, Function<String, String>>)c-> ClientHooks::stripSpecialChars,