Tweaked the startup warning. Closes #281, #282

This commit is contained in:
Adubbz 2014-06-24 17:03:12 +10:00
parent 26fad5b016
commit 1ca37426c6
5 changed files with 22 additions and 26 deletions

View file

@ -63,6 +63,8 @@ public class BiomesOPlenty
BOPEventHandlers.init();
proxy.registerRenderers();
BOPIntegration.preInit();
}
@EventHandler

View file

@ -50,7 +50,6 @@ public class BOPCBiomes
public static BiomeGenBase seasonalForest;
public static BiomeGenBase shield;
public static BiomeGenBase shrubland;
public static BiomeGenBase silkglades;
public static BiomeGenBase sludgepit;
public static BiomeGenBase steppe;
public static BiomeGenBase temperateRainforest;
@ -71,6 +70,7 @@ public class BOPCBiomes
public static BiomeGenBase orchard;
public static BiomeGenBase quagmire;
public static BiomeGenBase scrubland;
public static BiomeGenBase silkglades;
public static BiomeGenBase spruceWoods;
public static BiomeGenBase tropics;
public static BiomeGenBase volcano;

View file

@ -13,6 +13,7 @@ import net.minecraft.client.gui.GuiConfirmOpenLink;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.commons.io.FileUtils;
import org.lwjgl.input.Keyboard;
@ -41,26 +42,19 @@ public class StartupWarningGUI extends GuiScreen
public void initGui()
{
Keyboard.enableRepeatEvents(true);
//TODO: buttonList
this.buttonList.clear();
//TODO: buttonList
this.buttonList.add(new GuiButton(0, this.width / 2 - 175, this.height - 48, 350, 20, I18n.format("OK")));
//TODO: buttonList
this.buttonList.add(new GuiButton(1, this.width / 2 - 175, this.height - 24, 350, 20, I18n.format("Cancel")));
this.buttonList.add(new GuiButton(0, this.width / 2 - 175, this.height - 24, 350, 20, I18n.format("OK")));
}
@Override
//TODO: onGuiClosed()
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
}
@Override
//TODO: actionPerformed()
protected void actionPerformed(GuiButton button)
{
//TODO: enabled
if (button.enabled)
{
//TODO: id
@ -76,40 +70,33 @@ public class StartupWarningGUI extends GuiScreen
e.printStackTrace();
}
//TODO: displayGuiScreen()
this.mc.displayGuiScreen(this.parentGuiScreen);
}
//TODO: id
if (button.id == 1)
{
System.exit(0);
}
}
}
@Override
public void drawScreen(int x, int y, float renderPartialTicks)
{
//TODO: drawDefaultBackground()
this.drawDefaultBackground();
//TODO: fontRendererObj width
this.drawCenteredString(this.fontRendererObj, "" + RED + "Biomes O' Plenty uses a custom worldtype for its biomes. When creating a world, it", this.width / 2, 82, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + "may be enabled by clicking the 'World Type' button under 'More World Options'", this.width / 2, 94, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + "until it displays 'Biomes O' Plenty'.", this.width / 2, 106, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + StatCollector.translateToLocal("warning.bopStartup1"), this.width / 2, 82, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + StatCollector.translateToLocal("warning.bopStartup2"), this.width / 2, 94, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + StatCollector.translateToLocal("warning.bopStartup3"), this.width / 2, 106, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + "The worldtype can be used on servers by changing the 'level-type' in", this.width / 2, 132, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + "sever.properties to 'BIOMESOP' (without quotes)", this.width / 2, 144, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + StatCollector.translateToLocal("warning.bopStartup4"), this.width / 2, 132, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + RED + StatCollector.translateToLocal("warning.bopStartup5"), this.width / 2, 144, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + DARK_RED + "This message will only display once.", this.width / 2, 168, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "" + DARK_RED + StatCollector.translateToLocal("warning.bopStartup6"), this.width / 2, 168, 0xFFFFFF);
GL11.glEnable(GL11.GL_BLEND);
this.mc.getTextureManager().bindTexture(bopLogoTexture);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
// width x, y, u, v, width, height
this.drawTexturedModalRect(this.width / 2 - 168 / 2, 0, 0, 0, 168, 80);
GL11.glDisable(GL11.GL_BLEND);
super.drawScreen(x, y, renderPartialTicks);
}

View file

@ -25,7 +25,7 @@ public class ForestryIntegration
private static final Item mulch = GameRegistry.findItem("Forestry", "mulch");
public static void init()
protected static void init()
{
addFermenterRecipes();
addSqueezerRecipes();

View file

@ -412,6 +412,13 @@ phrase.bop.useBOPATGWorldtype=The Biomes O' Plenty world type or ATG world type
phrase.bop.useBOPWorldtype=The Biomes O' Plenty world type must be used in order for the new biomes to generate. This message will only display once.
phrase.bop.updateAvaliable=You are not using the latest recommended version of Biomes O' Plenty. The latest recommended version is: v%s for Minecraft %s
warning.bopStartup1=Biomes O' Plenty uses a custom worldtype for its biomes. When creating a world, it
warning.bopStartup2=may be enabled by clicking the 'World Type' button under 'More World Options'
warning.bopStartup3=until it displays 'Biomes O' Plenty'.
warning.bopStartup4=The worldtype can be used on servers by changing the 'level-type' in
warning.bopStartup5=sever.properties to 'BIOMESOP' (without quotes)
warning.bopStartup6=This message will only display once.
potion.paralysis=Paralysis
potion.possession=Possession