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())));
}
}
}
}
Aggregations