From 19a38f5cb97d67a17e18ef7cf1df6990386b68f7 Mon Sep 17 00:00:00 2001 From: cpw Date: Tue, 28 Jul 2020 19:17:29 -0400 Subject: [PATCH] Revert "Shut down all other mod handlers if the loading cycle errors. This prevents other mods from throwing errors and being blamed for initial cause. This is a temporary hack until cpw re-writes the mod event dispatcher." This reverts commit 7592bbe8 Signed-off-by: cpw --- src/main/java/net/minecraftforge/fml/ModContainer.java | 8 -------- src/main/java/net/minecraftforge/fml/ModList.java | 1 - .../minecraftforge/fml/javafmlmod/FMLModContainer.java | 1 - 3 files changed, 10 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/ModContainer.java b/src/main/java/net/minecraftforge/fml/ModContainer.java index 4869f7557c..daeb247b0d 100644 --- a/src/main/java/net/minecraftforge/fml/ModContainer.java +++ b/src/main/java/net/minecraftforge/fml/ModContainer.java @@ -104,7 +104,6 @@ public abstract class ModContainer */ public final void transitionState(LifecycleEventProvider.LifecycleEvent event, Consumer> errorHandler) { - if (shutdown) return; //TODO: Remove if (modLoadingStage == event.fromStage()) { try @@ -166,11 +165,4 @@ public abstract class ModContainer * @param e Event to accept */ protected void acceptEvent(Event e) {} - - //TEMPORARY INTERNAL FUNCTION UNTIL net.minecraftforge.fml.ModList.dispatchParallelEvent is fixed. - @Deprecated protected boolean shutdown = false; - @Deprecated protected void shutdown() - { - this.shutdown = true; - } } diff --git a/src/main/java/net/minecraftforge/fml/ModList.java b/src/main/java/net/minecraftforge/fml/ModList.java index 929870e3c1..c587048fd2 100644 --- a/src/main/java/net/minecraftforge/fml/ModList.java +++ b/src/main/java/net/minecraftforge/fml/ModList.java @@ -141,7 +141,6 @@ public class ModList catch (InterruptedException | ExecutionException e) { LOGGER.error(LOADING, "Encountered an exception during parallel processing - sleeping 10 seconds to wait for jobs to finish", e); - this.mods.forEach(ModContainer::shutdown); //Prevent all future events from being sent out. errorHandler.accept(Collections.singletonList(new UncaughtModLoadingException(lifecycleEvent.fromStage(), e))); modLoadingThreadPool.awaitQuiescence(10, TimeUnit.SECONDS); if (!modLoadingThreadPool.isQuiescent()) { diff --git a/src/main/java/net/minecraftforge/fml/javafmlmod/FMLModContainer.java b/src/main/java/net/minecraftforge/fml/javafmlmod/FMLModContainer.java index cfc0e14431..627196af79 100644 --- a/src/main/java/net/minecraftforge/fml/javafmlmod/FMLModContainer.java +++ b/src/main/java/net/minecraftforge/fml/javafmlmod/FMLModContainer.java @@ -171,7 +171,6 @@ public class FMLModContainer extends ModContainer @Override protected void acceptEvent(final Event e) { - if (this.shutdown) return; this.eventBus.post(e); }