Process the main modloading work on the async thread, but still

do deferred work on the main thread by passing in the executor.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-06-23 12:26:45 -04:00
1 parent 359be1a880
commit 9067dbf6a0
6 files changed
+54 -42

No files matched your search

@@ -43,11 +43,11 @@ public class ServerModLoader
LogicalSidedProvider.setServer(()->dedicatedServer);
LanguageHook.loadForgeAndMCLangs();
ModLoader.get().gatherAndInitializeMods();
ModLoader.get().loadMods();
ModLoader.get().loadMods(Runnable::run);
}
public static void end() {
ModLoader.get().finishMods();
ModLoader.get().finishMods(Runnable::run);
List<ModLoadingWarning> warnings = ModLoader.get().getWarnings();
if (!warnings.isEmpty()) {
LOGGER.warn(LOADING, "Mods loaded with {} warnings", warnings.size());