Moved the world type message to to world creation screen
This commit is contained in:
parent
1b31f6de22
commit
4ebd397f3c
5 changed files with 22 additions and 14 deletions
|
@ -19,7 +19,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class StartupWarningGUI extends GuiScreen
|
||||
public class WorldTypeMessageGUI extends GuiScreen
|
||||
{
|
||||
private GuiScreen parentGuiScreen;
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class StartupWarningGUI extends GuiScreen
|
|||
|
||||
private static final ResourceLocation bopLogoTexture = new ResourceLocation("biomesoplenty:textures/gui/logo256.png");
|
||||
|
||||
public StartupWarningGUI(GuiScreen parentGuiScreen, File nameHashFile, String nameHash)
|
||||
public WorldTypeMessageGUI(GuiScreen parentGuiScreen, File nameHashFile, String nameHash)
|
||||
{
|
||||
this.parentGuiScreen = parentGuiScreen;
|
||||
|
||||
|
@ -57,7 +57,6 @@ public class StartupWarningGUI extends GuiScreen
|
|||
{
|
||||
if (button.enabled)
|
||||
{
|
||||
//TODO: id
|
||||
if (button.id == 0)
|
||||
{
|
||||
try
|
|
@ -55,6 +55,8 @@ public class BOPItems
|
|||
BOPItemHelper.armorMaterialAmethyst = EnumHelper.addArmorMaterial("AMETHYST", 40, new int[] {6, 12, 10, 6}, 20);
|
||||
|
||||
BOPItemHelper.armorMaterialUnprotective = EnumHelper.addArmorMaterial("UNPROTECTIVE", -1, new int[] {0, 0, 0, 0}, 0);
|
||||
|
||||
registerCraftingMaterials();
|
||||
}
|
||||
|
||||
private static void registerItems()
|
||||
|
@ -117,6 +119,12 @@ public class BOPItems
|
|||
flippers = registerItem(new ItemFlippers(BOPItemHelper.armorMaterialUnprotective, BiomesOPlenty.proxy.addArmor("flippers"), 3).setUnlocalizedName("flippers"));
|
||||
wadingBoots = registerItem(new ItemWadingBoots(BOPItemHelper.armorMaterialUnprotective, BiomesOPlenty.proxy.addArmor("wadingBoots"), 3).setUnlocalizedName("wadingBoots"));
|
||||
}
|
||||
|
||||
private static void registerCraftingMaterials()
|
||||
{
|
||||
BOPItemHelper.toolMaterialMud.customCraftingMaterial = mudball;
|
||||
BOPItemHelper.armorMaterialMud.customCraftingMaterial = mudball;
|
||||
}
|
||||
|
||||
public static Item registerItem(Item item)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import biomesoplenty.client.fog.FogHandler;
|
|||
import biomesoplenty.client.utils.ParticleRegistry;
|
||||
import biomesoplenty.common.eventhandler.client.FlowerScatterEventHandler;
|
||||
import biomesoplenty.common.eventhandler.client.gui.MainMenuEventHandler;
|
||||
import biomesoplenty.common.eventhandler.client.gui.StartupWarningEventHandler;
|
||||
import biomesoplenty.common.eventhandler.client.gui.WorldTypeMessageEventHandler;
|
||||
import biomesoplenty.common.eventhandler.entity.DyeEventHandler;
|
||||
import biomesoplenty.common.eventhandler.entity.FlippersEventHandler;
|
||||
import biomesoplenty.common.eventhandler.entity.SlimeSpawnEventHandler;
|
||||
|
@ -62,7 +62,7 @@ public class BOPEventHandlers
|
|||
|
||||
private static void registerGUIEventHandlers()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(StartupWarningEventHandler.instance);
|
||||
MinecraftForge.EVENT_BUS.register(WorldTypeMessageEventHandler.instance);
|
||||
MinecraftForge.EVENT_BUS.register(new MainMenuEventHandler());
|
||||
}
|
||||
|
||||
|
|
|
@ -6,23 +6,24 @@ import java.io.IOException;
|
|||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiCreateWorld;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import biomesoplenty.client.gui.StartupWarningGUI;
|
||||
import biomesoplenty.client.gui.WorldTypeMessageGUI;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class StartupWarningEventHandler
|
||||
public class WorldTypeMessageEventHandler
|
||||
{
|
||||
public static StartupWarningEventHandler instance = new StartupWarningEventHandler();
|
||||
public static WorldTypeMessageEventHandler instance = new WorldTypeMessageEventHandler();
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void openMainMenu(GuiOpenEvent event)
|
||||
public void openCreateWorld(GuiOpenEvent event)
|
||||
{
|
||||
if (event.gui instanceof GuiMainMenu)
|
||||
if (event.gui instanceof GuiCreateWorld)
|
||||
{
|
||||
File nameHashFile = new File(Minecraft.getMinecraft().mcDataDir.getPath() + File.separator + "BOPChecks".hashCode());
|
||||
String nameHash = "" + Minecraft.getMinecraft().getSession().func_148256_e().hashCode();
|
||||
|
@ -31,7 +32,7 @@ public class StartupWarningEventHandler
|
|||
{
|
||||
if (!nameHashFile.exists() || !FileUtils.readFileToString(nameHashFile).contains(nameHash + "StartupWarning".hashCode()))
|
||||
{
|
||||
event.gui = new StartupWarningGUI(event.gui, nameHashFile, nameHash);
|
||||
event.gui = new WorldTypeMessageGUI(event.gui, nameHashFile, nameHash);
|
||||
}
|
||||
} catch (IOException e)
|
||||
{
|
|
@ -424,9 +424,9 @@ 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.bopStartup1=Biomes O' Plenty uses a custom worldtype for its biomes. It may be enabled by
|
||||
warning.bopStartup2=clicking the 'World Type' button under 'More World Options' until it displays
|
||||
warning.bopStartup3='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.
|
||||
|
|
Loading…
Reference in a new issue