mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Suppress firing events at load time if an error has already occurred (#4801)
This commit is contained in:
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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user