mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Add in the ability for a client to throw a custom exception that displays a custom gui instead of the default error message.
This commit is contained in:
1 parent
a82285964f
commit
7327ea75f7
10 files changed
+165
-6
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package cpw.mods.mockmod;
|
||||
|
||||
import net.minecraft.src.FontRenderer;
|
||||
import net.minecraft.src.GuiErrorScreen;
|
||||
import cpw.mods.fml.client.CustomModLoadingErrorDisplayException;
|
||||
|
||||
public class MockProxyClient extends MockProxy
|
||||
{
|
||||
@Override
|
||||
public void throwError()
|
||||
{
|
||||
throw new CustomModLoadingErrorDisplayException()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int par1, int par2, float par3)
|
||||
{
|
||||
errorScreen.func_73732_a(fontRenderer, "MockMod doesn't like your installation", errorScreen.field_73880_f / 2, 75, 0xFFFFFF);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui(GuiErrorScreen errorScreen, FontRenderer renderer)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user