    001    package cpw.mods.fml.client;
    002
    003    import cpw.mods.fml.common.Loader;
    004    import cpw.mods.fml.common.WrongMinecraftVersionException;
    005    import cpw.mods.fml.common.versioning.ArtifactVersion;
    006    import net.minecraft.src.GuiErrorScreen;
    007    import net.minecraft.src.GuiScreen;
    008
    009    public class GuiWrongMinecraft extends GuiErrorScreen
    010    {
    011        private WrongMinecraftVersionException wrongMC;
    012        public GuiWrongMinecraft(WrongMinecraftVersionException wrongMC)
    013        {
    014            this.wrongMC = wrongMC;
    015        }
    016        @Override
    017
    018        /**
    019         * Adds the buttons (and other controls) to the screen in question.
    020         */
    021        public void initGui()
    022        {
    023            super.initGui();
    024        }
    025        @Override
    026
    027        /**
    028         * Draws the screen and all the components in it.
    029         */
    030        public void drawScreen(int par1, int par2, float par3)
    031        {
    032            this.drawDefaultBackground();
    033            int offset = 75;
    034            this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
    035            offset+=10;
    036            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);
    037            offset+=5;
    038            offset+=10;
    039            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);
    040            offset+=20;
    041            this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
    042        }
    043    }