package techreborn.utils;

import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiErrorScreen;
import net.minecraftforge.fml.client.CustomModLoadingErrorDisplayException;
import net.minecraftforge.fml.client.IDisplayableError;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import java.awt.*;

public class UnspportedIc2Exception extends CustomModLoadingErrorDisplayException implements IDisplayableError {

	@Override
	public String getMessage() {
		return "IC2 is installed, but no supported helper was setup";
	}

	@SideOnly(Side.CLIENT)
	@Override
	public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) {

	}

	@SideOnly(Side.CLIENT)
	@Override
	public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime) {
		errorScreen.drawCenteredString(fontRenderer, "IC2 is installed, but no supported helper was setup", errorScreen.width / 2, 10, Color.RED.getRGB());
		errorScreen.drawCenteredString(fontRenderer, "This can happen due to unoffical versions of ic2.", errorScreen.width / 2, 50, 0xEEEEEE);
		errorScreen.drawCenteredString(fontRenderer, "If you are using offical ic2 please open an issue @ https://github.com/TechReborn/TechReborn/issues", errorScreen.width / 2, 60, 0xEEEEEE);

		if(Loader.isModLoaded("ic2-classic-spmod")){
			errorScreen.drawCenteredString(fontRenderer, "If you are using IC2 Classic please contact the mod author and ask for compatbility to be fixed", errorScreen.width / 2, 100, Color.GREEN.getRGB());
		}
	}
}

@@ -250,53 +250,8 @@
 or;%0A
-import net.minecraftforge.fml.common.Loader;%0A
 impo
@@ -1094,16 +1094,19 @@
 to u
-noffical
+sing forked
  ver
@@ -1258,17 +1258,16 @@
  issue @
- 
 https://
@@ -1351,56 +1351,8 @@
 );%0A%0A
-%09%09if(Loader.isModLoaded(%22ic2-classic-spmod%22))%7B%0A%09
 %09%09er
@@ -1416,19 +1416,21 @@
 ing 
-IC2 Classic
+a fork of IC2
  ple
@@ -1449,17 +1449,16 @@
 the 
-mod autho
+develope
 r an
@@ -1471,32 +1471,26 @@
 for 
-compatbility to be fixed
+TechReborn support
 %22, e
@@ -1543,12 +1543,8 @@
 ));%0A
-%09%09%7D%0A
 %09%7D%0A%7D

Tweak incompatible message