diff --git a/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java b/src/main/java/biomesoplenty/client/gui/WorldTypeMessageGUI.java similarity index 95% rename from src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java rename to src/main/java/biomesoplenty/client/gui/WorldTypeMessageGUI.java index 19e6ef5cd..5ea7570c2 100644 --- a/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java +++ b/src/main/java/biomesoplenty/client/gui/WorldTypeMessageGUI.java @@ -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 diff --git a/src/main/java/biomesoplenty/common/core/BOPItems.java b/src/main/java/biomesoplenty/common/core/BOPItems.java index b0d6ce2b7..387108250 100644 --- a/src/main/java/biomesoplenty/common/core/BOPItems.java +++ b/src/main/java/biomesoplenty/common/core/BOPItems.java @@ -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) { diff --git a/src/main/java/biomesoplenty/common/eventhandler/BOPEventHandlers.java b/src/main/java/biomesoplenty/common/eventhandler/BOPEventHandlers.java index 20d1fc6a0..c646c2c16 100644 --- a/src/main/java/biomesoplenty/common/eventhandler/BOPEventHandlers.java +++ b/src/main/java/biomesoplenty/common/eventhandler/BOPEventHandlers.java @@ -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()); } diff --git a/src/main/java/biomesoplenty/common/eventhandler/client/gui/StartupWarningEventHandler.java b/src/main/java/biomesoplenty/common/eventhandler/client/gui/WorldTypeMessageEventHandler.java similarity index 73% rename from src/main/java/biomesoplenty/common/eventhandler/client/gui/StartupWarningEventHandler.java rename to src/main/java/biomesoplenty/common/eventhandler/client/gui/WorldTypeMessageEventHandler.java index cc94ee787..1c63a0cc8 100644 --- a/src/main/java/biomesoplenty/common/eventhandler/client/gui/StartupWarningEventHandler.java +++ b/src/main/java/biomesoplenty/common/eventhandler/client/gui/WorldTypeMessageEventHandler.java @@ -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) { diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index ad8f69fd4..b7a46cefb 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -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.