Suppress firing events at load time if an error has already occurred (#4801)

This commit is contained in:
Ben Staddon authored and mezz committed 2018-04-12 17:18:43 -07:00
1 parent 76591f7245
commit d0566ebadc
4 files changed
+21 -1

No files matched your search

@@ -22,6 +22,7 @@ package net.minecraftforge.debug.mod;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiErrorScreen;
import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.client.CustomModLoadingErrorDisplayException;
@@ -58,6 +59,12 @@ public class ClientLoadingExceptionTest
throw new RuntimeException("This should not be called because the mod threw an exception earlier in Pre-Init and is in a broken state.");
}
@SubscribeEvent
public void onModelBake(ModelBakeEvent e)
{
throw new RuntimeException("This should not be called because the mod threw an exception earlier in Pre-Init and is in a broken state.");
}
@Mod.EventHandler
public void onInit(FMLInitializationEvent e)
{