Search in sources :

Example 1 with GuiJava8Error

use of net.minecraftforge.fml.client.GuiJava8Error in project MinecraftForge by MinecraftForge.

the class ForgeHooksClient method mainMenuMouseClick.

public static void mainMenuMouseClick(int mouseX, int mouseY, int mouseButton, FontRenderer font, int width) {
    if (!Loader.instance().java8) {
        if (mouseY >= (4 + (8 * 10)) && mouseY < (4 + (10 * 10))) {
            int w = font.getStringWidth(I18n.format("fml.messages.java8warning.1", TextFormatting.RED, TextFormatting.RESET));
            w = Math.max(w, font.getStringWidth(I18n.format("fml.messages.java8warning.2")));
            if (mouseX >= ((width - w) / 2) && mouseX <= ((width + w) / 2)) {
                FMLClientHandler.instance().showGuiScreen(new GuiJava8Error(new Java8VersionException(Collections.<ModContainer>emptyList())));
            }
        }
    }
}
Also used : Java8VersionException(net.minecraftforge.fml.common.Java8VersionException) GuiJava8Error(net.minecraftforge.fml.client.GuiJava8Error)

Aggregations

GuiJava8Error (net.minecraftforge.fml.client.GuiJava8Error)1 Java8VersionException (net.minecraftforge.fml.common.Java8VersionException)1