001/* 002 * Forge Mod Loader 003 * Copyright (c) 2012-2013 cpw. 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser Public License v2.1 006 * which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 008 * 009 * Contributors: 010 * cpw - implementation 011 */ 012 013package cpw.mods.fml.client; 014 015import net.minecraft.client.gui.GuiErrorScreen; 016import cpw.mods.fml.common.Loader; 017import cpw.mods.fml.common.WrongMinecraftVersionException; 018import cpw.mods.fml.common.versioning.ArtifactVersion; 019 020public class GuiWrongMinecraft extends GuiErrorScreen 021{ 022 private WrongMinecraftVersionException wrongMC; 023 public GuiWrongMinecraft(WrongMinecraftVersionException wrongMC) 024 { 025 this.wrongMC = wrongMC; 026 } 027 @Override 028 029 /** 030 * Adds the buttons (and other controls) to the screen in question. 031 */ 032 public void initGui() 033 { 034 super.initGui(); 035 } 036 @Override 037 038 /** 039 * Draws the screen and all the components in it. 040 */ 041 public void drawScreen(int par1, int par2, float par3) 042 { 043 this.drawDefaultBackground(); 044 int offset = 75; 045 this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF); 046 offset+=10; 047 this.drawCenteredString(this.fontRenderer, String.format("The mod listed below does not want to run in Minecraft version %s", Loader.instance().getMinecraftModContainer().getVersion()), this.width / 2, offset, 0xFFFFFF); 048 offset+=5; 049 offset+=10; 050 this.drawCenteredString(this.fontRenderer, String.format("%s (%s) wants Minecraft %s", wrongMC.mod.getName(), wrongMC.mod.getModId(), wrongMC.mod.acceptableMinecraftVersionRange()), this.width / 2, offset, 0xEEEEEE); 051 offset+=20; 052 this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF); 053 } 054}