From 499ccbc629f622c31e8c8c459b3ba9a623adaeb4 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 4 Feb 2014 19:51:22 -0500 Subject: [PATCH 01/15] Oopsie, teehee --- src/tppitweaks/client/gui/UpdateGui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tppitweaks/client/gui/UpdateGui.java b/src/tppitweaks/client/gui/UpdateGui.java index 7f311e2..de048d7 100644 --- a/src/tppitweaks/client/gui/UpdateGui.java +++ b/src/tppitweaks/client/gui/UpdateGui.java @@ -48,7 +48,7 @@ public UpdateGui(GuiScreen parentScreen, boolean firstTime) initModInstallationMenus(); - if (modScreens.isEmpty()) + if (modScreens.isEmpty() && !firstTime) Minecraft.getMinecraft().thePlayer.sendChatToPlayer(new ChatMessageComponent().addText("You have all optional mods installed!")); for (InstructionsGui g : modScreens) From 32916033d0740685cd10cf429c525e29b628e276 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Thu, 6 Feb 2014 15:40:44 -0500 Subject: [PATCH 02/15] Remove XP seeds --- src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java index d5477c6..867dba9 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java @@ -5,6 +5,11 @@ public class MagicropsTweaks { + public static void init() + { + TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsXP.itemID, -1); + } + public static void registerOres() { OreDictionary.registerOre("oreMCropsEssence", new ItemStack(magicalcrops.mod_mCrops.BlockOreEssence)); From 37d29ed3bc81cb6e9235da0f6d54eee98584e6e5 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Thu, 6 Feb 2014 16:04:14 -0500 Subject: [PATCH 03/15] Tweak TE recipe, add code to activate new tweaks. --- .../config/ConfigurationHandler.java | 2 ++ src/tppitweaks/recipetweaks/RecipeTweaks.java | 14 ++++++++++++ .../modTweaks/GregtechTweaks.java | 2 +- .../recipetweaks/modTweaks/TETweaks.java | 22 +++++++++++++++++-- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/tppitweaks/config/ConfigurationHandler.java b/src/tppitweaks/config/ConfigurationHandler.java index 74beb3c..477e1f2 100644 --- a/src/tppitweaks/config/ConfigurationHandler.java +++ b/src/tppitweaks/config/ConfigurationHandler.java @@ -49,6 +49,7 @@ public class ConfigurationHandler public static boolean readdResinSmelting; public static boolean doCharcoalBlockCompression; + public static boolean harderActivatorRecipe; public static boolean harderDisassemblerRecipe; public static boolean disableCardboardBox; @@ -120,6 +121,7 @@ public static void init(File file) addOsmiumToOreWasher = config.get("Other Mod Tweaks", "addOsmiumToOreWasher", true, "Add a recipe for impure osmium dust to clean osmium dust in the IC2 ore washer.").getBoolean(true); harderDisassemblerRecipe = config.get("Other Mod Tweaks", "harderAtomicDisassembler", true, "Makes the recipe for the Atomic Disassembler much more difficult").getBoolean(true); disableCardboardBox = config.get("Other Mod Tweaks", "disableCardboardBox", true, "Remove the recipe for the cardboard box (it can move ANY tile entity including nodes and spanwers)").getBoolean(true); + harderActivatorRecipe = config.get("Other Mod Tweaks", "harderActivatorRecipe", true, "Make the autonomous activator recipe slightly harder").getBoolean(true); autoEnableTT = config.get("Mod Loading Tweaks", "autoEnableTT", true, "Allow this mod to disable and enable Thaumic Tinkerer automatically").getBoolean(true); diff --git a/src/tppitweaks/recipetweaks/RecipeTweaks.java b/src/tppitweaks/recipetweaks/RecipeTweaks.java index 8f05718..5b83af1 100644 --- a/src/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/tppitweaks/recipetweaks/RecipeTweaks.java @@ -26,6 +26,7 @@ import tppitweaks.recipetweaks.modTweaks.MekanismTweaks; import tppitweaks.recipetweaks.modTweaks.OpenBlocksTweaks; import tppitweaks.recipetweaks.modTweaks.SFMTweaks; +import tppitweaks.recipetweaks.modTweaks.TETweaks; import tppitweaks.recipetweaks.modTweaks.TweakerBase; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; @@ -48,6 +49,7 @@ public class RecipeTweaks private static boolean okayToTweakExU; private static boolean okayToTweakMPSA; private static boolean okayToTweakMekanism; + private static boolean okayToTweakTE; public static void doPostInitRecipeTweaks() { @@ -117,6 +119,7 @@ private static void checkWhatWeCanTweak() okayToTweakExU = Loader.isModLoaded("ExtraUtilities") && ConfigurationHandler.fixExURecipes; okayToTweakMPSA = Loader.isModLoaded("powersuitaddons") && ConfigurationHandler.changeMPSARecipes; okayToTweakMekanism = Loader.isModLoaded("Mekanism"); + okayToTweakTE = Loader.isModLoaded("ThermalExpansion"); } private static void initRemovableRecipesMap() @@ -162,6 +165,14 @@ private static void initRemovableRecipesMap() { MekanismTweaks.init(); } + if (okayToTweakTE && ConfigurationHandler.harderActivatorRecipe) + { + TETweaks.init(); + } + if (okayToTweakMagicalCrops) + { + MagicropsTweaks.init(); + } } private static boolean canRemoveRecipe(IRecipe r) @@ -205,6 +216,9 @@ private static void addRevisedRecipes() if (okayToTweakMekanism && ConfigurationHandler.harderDisassemblerRecipe) MekanismTweaks.addRecipes(); + if (okayToTweakTE && ConfigurationHandler.harderActivatorRecipe) + TETweaks.addRecipes(); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint})); } diff --git a/src/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index a652cd7..4025821 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -73,7 +73,7 @@ public static void doStuff() public static void addRecipes() { if(ConfigurationHandler.unnerfPaperRecipe) { GameRegistry.addShapelessRecipe(new ItemStack(Item.paper, 3), new Object[] {Item.reed, Item.reed, Item.reed}); - TETweaks.addPaperRecipe(); + TETweaks.addRecipes(); GameRegistry.addRecipe(new ItemStack(Item.paper, 3), new Object[] {"#", "#", "#", '#', Item.reed}); } if(ConfigurationHandler.readdResinSmelting) { diff --git a/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java b/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java index 245a256..c8c0996 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java @@ -1,15 +1,33 @@ package tppitweaks.recipetweaks.modTweaks; +import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.ShapedOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; public class TETweaks { - public static void addPaperRecipe() { + public static void init() + { + TweakerBase.markItemForRecipeRemoval(thermalexpansion.block.TEBlocks.blockDevice.blockID, 2); + } + + public static void addRecipes() { try { GameRegistry.addShapelessRecipe(new ItemStack(Item.paper, 3), new Object[] {thermalexpansion.item.TEItems.woodchips, thermalexpansion.item.TEItems.woodchips, thermalexpansion.item.TEItems.woodchips}); }catch(Throwable t) {} + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(thermalexpansion.block.TEBlocks.blockDevice.blockID, 1, 2), new Object[]{ + "scs", + "tpt", + "sns", + + 's', "ingotSteel", + 'p', Block.pistonBase, + 't', "ingotTin", + 'c', Block.chest, + 'n', thermalexpansion.item.TEItems.pneumaticServo + })); } - } From 2f3d47e3e319dd64523f860f3fb47bb0a6123385 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 01:27:45 -0500 Subject: [PATCH 04/15] - Add ruby -> ruby dust recipe - Add woodchip -> paper recipe - Add /tppi removeBooks command - Version bump --- mod.properties | 2 +- src/tppitweaks/TPPITweaks.java | 2 +- src/tppitweaks/command/CommandTPPI.java | 18 +++++++++--------- src/tppitweaks/lib/Reference.java | 2 +- .../recipetweaks/modTweaks/TETweaks.java | 4 ++++ 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/mod.properties b/mod.properties index 094485d..2b684c3 100644 --- a/mod.properties +++ b/mod.properties @@ -1,5 +1,5 @@ version.minecraft=1.6.X -version.number=0.8.1 +version.number=0.8.2 version.build= mod.id=TPPITweaks diff --git a/src/tppitweaks/TPPITweaks.java b/src/tppitweaks/TPPITweaks.java index ecf9bef..22d5edc 100644 --- a/src/tppitweaks/TPPITweaks.java +++ b/src/tppitweaks/TPPITweaks.java @@ -34,7 +34,7 @@ @NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class) public class TPPITweaks { - public static final String VERSION = "0.8.1"; + public static final String VERSION = "0.8.2"; @Instance("TPPITweaks") public static TPPITweaks instance; diff --git a/src/tppitweaks/command/CommandTPPI.java b/src/tppitweaks/command/CommandTPPI.java index fb7730f..9344e79 100644 --- a/src/tppitweaks/command/CommandTPPI.java +++ b/src/tppitweaks/command/CommandTPPI.java @@ -143,16 +143,16 @@ else if (astring[0].equalsIgnoreCase("mods")) private void removeGuideBooks(ICommandSender command) { EntityPlayer player = command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()); - - for(ItemStack s : player.inventory.mainInventory) { - try{ - if(s.itemID == Item.writtenBook.itemID && s.stackTagCompound.getTag("author").equals(ConfigurationHandler.bookAuthor)) { - s.stackSize = 0; - player.inventoryContainer.detectAndSendChanges(); - } - }catch(Throwable t) {} + ItemStack[] inv = player.inventory.mainInventory; + for (int i = 0; i < inv.length; i++) + { + if (inv[i] != null && // no null itemstack + inv[i].stackTagCompound != null && // no null stack tag + inv[i].stackTagCompound.toString().contains(ConfigurationHandler.bookAuthor) && // has the author + inv[i].itemID == Item.writtenBook.itemID) // is a vanilla book + + inv[i] = null; } - } private void processCommandGuide(ICommandSender command) diff --git a/src/tppitweaks/lib/Reference.java b/src/tppitweaks/lib/Reference.java index dc6e479..c352840 100644 --- a/src/tppitweaks/lib/Reference.java +++ b/src/tppitweaks/lib/Reference.java @@ -37,6 +37,6 @@ public class Reference + "after:Mekanism"; - public static final String PACK_VERSION = "0.2.1"; + public static final String PACK_VERSION = "0.2.2"; } diff --git a/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java b/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java index c8c0996..da8f14c 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/TETweaks.java @@ -3,6 +3,7 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; @@ -29,5 +30,8 @@ public static void addRecipes() { 'c', Block.chest, 'n', thermalexpansion.item.TEItems.pneumaticServo })); + + if (OreDictionary.getOres("dustRuby").size() != 0) + thermalexpansion.util.crafting.PulverizerManager.addIngotNameToDustRecipe(2400, "gemRuby", OreDictionary.getOres("dustRuby").get(0)); } } From 7b4ca56703a7d2de52af9441c304161c97a1db23 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 01:58:34 -0500 Subject: [PATCH 05/15] Attempt to fix GUI bug --- src/tppitweaks/TPPITweaks.java | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/tppitweaks/TPPITweaks.java b/src/tppitweaks/TPPITweaks.java index 22d5edc..55a6c49 100644 --- a/src/tppitweaks/TPPITweaks.java +++ b/src/tppitweaks/TPPITweaks.java @@ -29,10 +29,13 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @Mod(modid = "TPPITweaks", name = "TPPI Tweaks", version = TPPITweaks.VERSION, dependencies = Reference.DEPENDENCIES) @NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class) -public class TPPITweaks { +public class TPPITweaks +{ public static final String VERSION = "0.8.2"; @@ -41,9 +44,9 @@ public class TPPITweaks { public static TPPIEventHandler eventHandler; public static TPPIPlayerTracker playerTracker; - + public static final Logger logger = Logger.getLogger("TPPITweaks"); - + public static CreativeTabTPPI creativeTab = new CreativeTabTPPI(CreativeTabs.getNextID()); @EventHandler @@ -77,13 +80,11 @@ public void preInit(FMLPreInitializationEvent event) { playerTracker = new TPPIPlayerTracker(); GameRegistry.registerPlayerTracker(playerTracker); MinecraftForge.EVENT_BUS.register(playerTracker); - - if (FMLCommonHandler.instance().getEffectiveSide().isClient()) - GuiHelper.initMap(); } @EventHandler - public void init(FMLInitializationEvent event) { + public void init(FMLInitializationEvent event) + { AM2SpawnControls.doAM2SpawnControls(); eventHandler = new TPPIEventHandler(); @@ -92,12 +93,19 @@ public void init(FMLInitializationEvent event) { } @EventHandler - public void postInit(FMLPostInitializationEvent event) { + public void postInit(FMLPostInitializationEvent event) + { RecipeTweaks.doPostInitRecipeTweaks(); + + if (FMLCommonHandler.instance().getEffectiveSide().isClient()) + { + GuiHelper.initMap(); + } } @EventHandler - public void onFMLServerStart(FMLServerStartingEvent event) { + public void onFMLServerStart(FMLServerStartingEvent event) + { event.registerServerCommand(new CommandTPPI()); } } From 4791f15c4feede4a483f2a2b9102543ad20147a7 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 02:12:55 -0500 Subject: [PATCH 06/15] Use correct method calls. Should fix GUI bug. --- src/tppitweaks/TPPITweaks.java | 2 +- src/tppitweaks/item/TPPIBook.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tppitweaks/TPPITweaks.java b/src/tppitweaks/TPPITweaks.java index 55a6c49..244467a 100644 --- a/src/tppitweaks/TPPITweaks.java +++ b/src/tppitweaks/TPPITweaks.java @@ -97,7 +97,7 @@ public void postInit(FMLPostInitializationEvent event) { RecipeTweaks.doPostInitRecipeTweaks(); - if (FMLCommonHandler.instance().getEffectiveSide().isClient()) + if (FMLCommonHandler.instance().getSide().isClient()) { GuiHelper.initMap(); } diff --git a/src/tppitweaks/item/TPPIBook.java b/src/tppitweaks/item/TPPIBook.java index 084f3d1..3d0fe45 100644 --- a/src/tppitweaks/item/TPPIBook.java +++ b/src/tppitweaks/item/TPPIBook.java @@ -53,7 +53,7 @@ public Icon getIconFromDamage(int par1) @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (stack.getItemDamage() == 2 && FMLCommonHandler.instance().getEffectiveSide().isClient()) + if (stack.getItemDamage() == 2 && FMLCommonHandler.instance().getSide().isClient()) { GuiHelper.doGuideGUI(); } From f0dd3167aef06f632d2676541bf28924e71dccbe Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 02:46:10 -0500 Subject: [PATCH 07/15] Trying again... --- src/tppitweaks/client/gui/modGuides/GuiGuideBase.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java index 6848f40..7f53f89 100644 --- a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java +++ b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java @@ -5,12 +5,13 @@ import java.util.Map; import java.util.TreeMap; -import org.lwjgl.opengl.GL11; - import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import tppitweaks.client.gui.library.gui.GuiBase; import tppitweaks.client.gui.library.gui.button.GuideButton; import tppitweaks.client.gui.library.gui.element.ElementBase; @@ -24,7 +25,10 @@ import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; +import cpw.mods.fml.common.Optional.Interface; +import cpw.mods.fml.common.Optional.InterfaceList; +@InterfaceList(value = { @Interface(iface = "INEIGuiHandler", modid = "NotEnoughItems") }) public class GuiGuideBase extends GuiBase implements INEIGuiHandler { protected static Map mods = new TreeMap(); From 9d9eb1459bfec1b7f878f1801086b87a1c8727f7 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 02:55:39 -0500 Subject: [PATCH 08/15] If this doesn't fix, NEI becomes a dependency. --- src/codechicken/nei/api/INEIGuiHandler.java | 20 +++++++++++++++++++ .../client/gui/modGuides/GuiGuideBase.java | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/codechicken/nei/api/INEIGuiHandler.java diff --git a/src/codechicken/nei/api/INEIGuiHandler.java b/src/codechicken/nei/api/INEIGuiHandler.java new file mode 100644 index 0000000..94f44f3 --- /dev/null +++ b/src/codechicken/nei/api/INEIGuiHandler.java @@ -0,0 +1,20 @@ +package codechicken.nei.api; + +import java.util.List; + +import codechicken.nei.VisiblityData; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; + +public interface INEIGuiHandler +{ + public int getItemSpawnSlot(GuiContainer gui, ItemStack item); + + public List getInventoryAreas(GuiContainer gui); + + public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button); + + public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h); + + public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility); +} diff --git a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java index 7f53f89..c3c950b 100644 --- a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java +++ b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java @@ -28,7 +28,6 @@ import cpw.mods.fml.common.Optional.Interface; import cpw.mods.fml.common.Optional.InterfaceList; -@InterfaceList(value = { @Interface(iface = "INEIGuiHandler", modid = "NotEnoughItems") }) public class GuiGuideBase extends GuiBase implements INEIGuiHandler { protected static Map mods = new TreeMap(); From 5df0f098a3078024569578056c56768cf8e0ce4e Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 15:38:41 -0500 Subject: [PATCH 09/15] Add force shears config option. Remove dumb class. --- src/tppitweaks/client/gui/modGuides/GuiGuideBase.java | 2 -- src/tppitweaks/config/ConfigurationHandler.java | 2 ++ src/tppitweaks/recipetweaks/RecipeTweaks.java | 5 ++--- src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java | 5 ++++- .../recipetweaks/modTweaks/DCandIC2Tweaks.java | 11 ----------- src/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java | 6 ++++++ 6 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 src/tppitweaks/recipetweaks/modTweaks/DCandIC2Tweaks.java diff --git a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java index c3c950b..a345cd7 100644 --- a/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java +++ b/src/tppitweaks/client/gui/modGuides/GuiGuideBase.java @@ -25,8 +25,6 @@ import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; -import cpw.mods.fml.common.Optional.Interface; -import cpw.mods.fml.common.Optional.InterfaceList; public class GuiGuideBase extends GuiBase implements INEIGuiHandler { diff --git a/src/tppitweaks/config/ConfigurationHandler.java b/src/tppitweaks/config/ConfigurationHandler.java index 477e1f2..5dd7f78 100644 --- a/src/tppitweaks/config/ConfigurationHandler.java +++ b/src/tppitweaks/config/ConfigurationHandler.java @@ -54,6 +54,7 @@ public class ConfigurationHandler public static boolean disableCardboardBox; public static boolean removeStupidEnergyCrystalRecipe; + public static boolean disableForceShears; public static boolean addOsmiumToOreWasher; @@ -103,6 +104,7 @@ public static void init(File file) glassFuelRods = config.get("Other Mod Tweaks", "glassFuelRods", true, "Big Reactors fuel rods take just a touch of reactor glass.").getBoolean(true); eloraamBreakersAndDeployers = config.get("Other Mod Tweaks", "eloraamBreakersAndDeployers", true, "OpenBlocks block breakers and placers have the same recipes as Redpower 2's.").getBoolean(true); removeStupidEnergyCrystalRecipe = config.get("Other Mod Tweaks", "removeDartCraftEnergyCrystalRecipe", true, "Remove DartCraft's IC2 energy crystal recipe.").getBoolean(true); + disableForceShears = config.get("Other Mod Tweaks", "disableForceShears", true, "Remove the force shears recipe because they were crashing servers rarely, but in a serious way. Disable this at your own risk.").getBoolean(true); fixExURecipes = config.get("Other Mod Tweaks", "fixExtraUtilsRecipes", true, "Current version of ExU has broken recipes for the unstable ingot block. This fixes that.").getBoolean(true); changeMPSARecipes = config.get("MPS Extra Recipes", "change_MPSA_recipes", true, "Changes MPSA recipes to match the MPS recipes that are in TPPI").getBoolean(true); diff --git a/src/tppitweaks/recipetweaks/RecipeTweaks.java b/src/tppitweaks/recipetweaks/RecipeTweaks.java index 5b83af1..7a391ef 100644 --- a/src/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/tppitweaks/recipetweaks/RecipeTweaks.java @@ -16,7 +16,6 @@ import tppitweaks.recipetweaks.modTweaks.BigReactorsTweaks; import tppitweaks.recipetweaks.modTweaks.DATweaks; import tppitweaks.recipetweaks.modTweaks.DCTweaks; -import tppitweaks.recipetweaks.modTweaks.DCandIC2Tweaks; import tppitweaks.recipetweaks.modTweaks.EnderStorageTweaks; import tppitweaks.recipetweaks.modTweaks.ExUTweaks; import tppitweaks.recipetweaks.modTweaks.GregtechTweaks; @@ -153,9 +152,9 @@ private static void initRemovableRecipesMap() { DCTweaks.init(); } - if (okayToTweakDartCraft && okayToTweakIC2) + if (okayToTweakIC2) { - DCandIC2Tweaks.init(); + IC2Tweaks.init(); } if (okayToTweakMPSA) { diff --git a/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java index ee15e21..7ac8b27 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java @@ -1,11 +1,14 @@ package tppitweaks.recipetweaks.modTweaks; +import tppitweaks.config.ConfigurationHandler; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public class DCTweaks { public static void init() { - TweakerBase.markItemForRecipeRemoval(((Item)bluedart.item.DartItem.forceShears).itemID, 0); + if (ConfigurationHandler.disableForceShears) + TweakerBase.markItemForRecipeRemoval(((Item)bluedart.item.DartItem.forceShears).itemID, 0); } } diff --git a/src/tppitweaks/recipetweaks/modTweaks/DCandIC2Tweaks.java b/src/tppitweaks/recipetweaks/modTweaks/DCandIC2Tweaks.java deleted file mode 100644 index 7fa7321..0000000 --- a/src/tppitweaks/recipetweaks/modTweaks/DCandIC2Tweaks.java +++ /dev/null @@ -1,11 +0,0 @@ -package tppitweaks.recipetweaks.modTweaks; - -import net.minecraft.item.ItemStack; - -public class DCandIC2Tweaks -{ - public static void init() - { - TweakerBase.markItemForRecipeRemoval(((ItemStack)ic2.core.Ic2Items.energyCrystal).itemID, -1); - } -} diff --git a/src/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java b/src/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java index e19ad9b..213d8d1 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java @@ -8,6 +8,12 @@ public class IC2Tweaks { + public static void init() + { + if (ConfigurationHandler.removeStupidEnergyCrystalRecipe) + TweakerBase.markItemForRecipeRemoval(((ItemStack)ic2.core.Ic2Items.energyCrystal).itemID, -1); + } + public static void registerOres() { if (ConfigurationHandler.ic2TEGlassInterchangeability) From 093427b62d0e7a86c05afbd6f2dff9a4b752e623 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 15:54:53 -0500 Subject: [PATCH 10/15] Fix atomic disassembler recipe not using correct damage value. --- src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index a03ef23..a4edb06 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -30,7 +30,7 @@ public static void addRecipes() " o ", 'D', new ItemStack(ModItems.tppiMaterial, 1, 2), - 't', mekanism.common.Mekanism.EnergyTablet, + 't', new ItemStack(mekanism.common.Mekanism.EnergyTablet, 1, 1), 'o', "ingotRefinedObsidian", 'A', mekanism.common.Mekanism.AtomicCore })); From b58435771988aafc1ec16bfb074f9e4c69917587 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 20:40:27 -0500 Subject: [PATCH 11/15] - Add harder recipe for lillipad of fertility - Add many things to mekanism machines (closes #28) - Add config options - Add magicrops ore recipes to pulverizer and macerator - Add essence seed recipe - General cleanup - Version bump --- .classpath | 2 + mod.properties | 2 +- src/tppitweaks/TPPITweaks.java | 5 +- .../config/ConfigurationHandler.java | 6 + src/tppitweaks/event/TPPIEventHandler.java | 2 - src/tppitweaks/lib/Reference.java | 5 +- src/tppitweaks/recipetweaks/RecipeTweaks.java | 23 +++- .../recipetweaks/modTweaks/DCTweaks.java | 3 +- .../modTweaks/MagicropsAndIC2Tweaks.java | 12 ++ .../modTweaks/MagicropsAndTETweaks.java | 13 ++ .../modTweaks/MagicropsTweaks.java | 28 ++++- .../modTweaks/MekanismTweaks.java | 113 +++++++++++++++++- .../modTweaks/ReliquaryTweaks.java | 27 +++++ 13 files changed, 216 insertions(+), 25 deletions(-) create mode 100644 src/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java create mode 100644 src/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java create mode 100644 src/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java diff --git a/.classpath b/.classpath index 3fb0720..a7bcacc 100644 --- a/.classpath +++ b/.classpath @@ -26,5 +26,7 @@ + + diff --git a/mod.properties b/mod.properties index 2b684c3..3d2d24e 100644 --- a/mod.properties +++ b/mod.properties @@ -1,5 +1,5 @@ version.minecraft=1.6.X -version.number=0.8.2 +version.number=0.8.3 version.build= mod.id=TPPITweaks diff --git a/src/tppitweaks/TPPITweaks.java b/src/tppitweaks/TPPITweaks.java index 244467a..2deed49 100644 --- a/src/tppitweaks/TPPITweaks.java +++ b/src/tppitweaks/TPPITweaks.java @@ -29,15 +29,12 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @Mod(modid = "TPPITweaks", name = "TPPI Tweaks", version = TPPITweaks.VERSION, dependencies = Reference.DEPENDENCIES) @NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class) public class TPPITweaks { - - public static final String VERSION = "0.8.2"; + public static final String VERSION = "0.8.3"; @Instance("TPPITweaks") public static TPPITweaks instance; diff --git a/src/tppitweaks/config/ConfigurationHandler.java b/src/tppitweaks/config/ConfigurationHandler.java index 5dd7f78..2950406 100644 --- a/src/tppitweaks/config/ConfigurationHandler.java +++ b/src/tppitweaks/config/ConfigurationHandler.java @@ -49,9 +49,13 @@ public class ConfigurationHandler public static boolean readdResinSmelting; public static boolean doCharcoalBlockCompression; + public static boolean addEssenceSeedRecipe; + public static boolean harderActivatorRecipe; public static boolean harderDisassemblerRecipe; public static boolean disableCardboardBox; + + public static boolean harderLillipadRecipe; public static boolean removeStupidEnergyCrystalRecipe; public static boolean disableForceShears; @@ -124,6 +128,8 @@ public static void init(File file) harderDisassemblerRecipe = config.get("Other Mod Tweaks", "harderAtomicDisassembler", true, "Makes the recipe for the Atomic Disassembler much more difficult").getBoolean(true); disableCardboardBox = config.get("Other Mod Tweaks", "disableCardboardBox", true, "Remove the recipe for the cardboard box (it can move ANY tile entity including nodes and spanwers)").getBoolean(true); harderActivatorRecipe = config.get("Other Mod Tweaks", "harderActivatorRecipe", true, "Make the autonomous activator recipe slightly harder").getBoolean(true); + harderLillipadRecipe = config.get("Other Mod Tweaks", "harderLillipadOfFertility", true, "Make the lillipad of fertility much harder to craft").getBoolean(true); + addEssenceSeedRecipe = config.get("Other Mod Tweaks", "addEssenceSeedRecipe", true, "Add a recipe for the essence seeds in magical crops").getBoolean(true); autoEnableTT = config.get("Mod Loading Tweaks", "autoEnableTT", true, "Allow this mod to disable and enable Thaumic Tinkerer automatically").getBoolean(true); diff --git a/src/tppitweaks/event/TPPIEventHandler.java b/src/tppitweaks/event/TPPIEventHandler.java index 7e2a127..d4b07cb 100644 --- a/src/tppitweaks/event/TPPIEventHandler.java +++ b/src/tppitweaks/event/TPPIEventHandler.java @@ -30,7 +30,6 @@ public class TPPIEventHandler { - private boolean shouldLoadGUI = true; public static boolean NBTValOnDeath; @@ -179,5 +178,4 @@ public void onPlayerJoin(EntityJoinWorldEvent event) { if (!RecipeTweaks.recipesInitialized) RecipeTweaks.doPlayerJoinRecipeTweaks(); } - } \ No newline at end of file diff --git a/src/tppitweaks/lib/Reference.java b/src/tppitweaks/lib/Reference.java index c352840..7f98710 100644 --- a/src/tppitweaks/lib/Reference.java +++ b/src/tppitweaks/lib/Reference.java @@ -34,9 +34,8 @@ public class Reference + "after:BuildCraft|Core;" + "after:powersuitaddons;" + "after:powersuits;" - + "after:Mekanism"; - + + "after:Mekanism;" + + "after:xreliquary"; public static final String PACK_VERSION = "0.2.2"; - } diff --git a/src/tppitweaks/recipetweaks/RecipeTweaks.java b/src/tppitweaks/recipetweaks/RecipeTweaks.java index 7a391ef..6c6d607 100644 --- a/src/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/tppitweaks/recipetweaks/RecipeTweaks.java @@ -21,9 +21,12 @@ import tppitweaks.recipetweaks.modTweaks.GregtechTweaks; import tppitweaks.recipetweaks.modTweaks.IC2Tweaks; import tppitweaks.recipetweaks.modTweaks.MPSATweaks; +import tppitweaks.recipetweaks.modTweaks.MagicropsAndIC2Tweaks; +import tppitweaks.recipetweaks.modTweaks.MagicropsAndTETweaks; import tppitweaks.recipetweaks.modTweaks.MagicropsTweaks; import tppitweaks.recipetweaks.modTweaks.MekanismTweaks; import tppitweaks.recipetweaks.modTweaks.OpenBlocksTweaks; +import tppitweaks.recipetweaks.modTweaks.ReliquaryTweaks; import tppitweaks.recipetweaks.modTweaks.SFMTweaks; import tppitweaks.recipetweaks.modTweaks.TETweaks; import tppitweaks.recipetweaks.modTweaks.TweakerBase; @@ -49,10 +52,10 @@ public class RecipeTweaks private static boolean okayToTweakMPSA; private static boolean okayToTweakMekanism; private static boolean okayToTweakTE; + private static boolean okayToTweakReliquary; public static void doPostInitRecipeTweaks() - { - + { recipesInitialized = false; checkWhatWeCanTweak(); @@ -76,7 +79,6 @@ public static void doPostInitRecipeTweaks() removeSomeRecipes(); addRevisedRecipes(); - } public static void doPlayerJoinRecipeTweaks() @@ -113,12 +115,13 @@ private static void checkWhatWeCanTweak() okayToTweakSFM = Loader.isModLoaded("AppliedEnergistics") && Loader.isModLoaded("StevesFactoryManager") && ConfigurationHandler.tweakSFM; okayToTweakOpenBlocks = Loader.isModLoaded("OpenBlocks") && ConfigurationHandler.eloraamBreakersAndDeployers; okayToTweakAM2 = Loader.isModLoaded("arsmagica2") && ConfigurationHandler.tweakAM2; - okayToTweakMagicalCrops = Loader.isModLoaded("magicalcrops") && ConfigurationHandler.registerMagicalCropsOre; + okayToTweakMagicalCrops = Loader.isModLoaded("magicalcrops"); okayToTweakDartCraft = Loader.isModLoaded("DartCraft") && ConfigurationHandler.removeStupidEnergyCrystalRecipe; okayToTweakExU = Loader.isModLoaded("ExtraUtilities") && ConfigurationHandler.fixExURecipes; okayToTweakMPSA = Loader.isModLoaded("powersuitaddons") && ConfigurationHandler.changeMPSARecipes; okayToTweakMekanism = Loader.isModLoaded("Mekanism"); okayToTweakTE = Loader.isModLoaded("ThermalExpansion"); + okayToTweakReliquary = Loader.isModLoaded("xreliquary") && ConfigurationHandler.harderLillipadRecipe; } private static void initRemovableRecipesMap() @@ -218,6 +221,18 @@ private static void addRevisedRecipes() if (okayToTweakTE && ConfigurationHandler.harderActivatorRecipe) TETweaks.addRecipes(); + if (okayToTweakMagicalCrops) + MagicropsTweaks.addRecipes(); + + if (okayToTweakMagicalCrops && okayToTweakIC2) + MagicropsAndIC2Tweaks.addRecipes(); + + if (okayToTweakMagicalCrops && okayToTweakTE) + MagicropsAndTETweaks.addRecipes(); + + if (okayToTweakReliquary) + ReliquaryTweaks.addRecipes(); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint})); } diff --git a/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java index 7ac8b27..899e67e 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/DCTweaks.java @@ -1,8 +1,7 @@ package tppitweaks.recipetweaks.modTweaks; -import tppitweaks.config.ConfigurationHandler; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; +import tppitweaks.config.ConfigurationHandler; public class DCTweaks { diff --git a/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java new file mode 100644 index 0000000..0274704 --- /dev/null +++ b/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java @@ -0,0 +1,12 @@ +package tppitweaks.recipetweaks.modTweaks; + +import net.minecraft.item.ItemStack; + +public class MagicropsAndIC2Tweaks +{ + public static void addRecipes() + { + ic2.core.block.machine.tileentity.TileEntityMacerator.addRecipe("oreMCropsEssence", 1, new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 8, 4)); + ic2.core.block.machine.tileentity.TileEntityMacerator.addRecipe("oreMCropsNetherEssence", 1, new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 12, 4)); + } +} diff --git a/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java new file mode 100644 index 0000000..c72c12a --- /dev/null +++ b/src/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java @@ -0,0 +1,13 @@ +package tppitweaks.recipetweaks.modTweaks; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class MagicropsAndTETweaks +{ + public static void addRecipes() + { + thermalexpansion.util.crafting.PulverizerManager.addRecipe(2400, OreDictionary.getOres("oreMCropsEssence").get(0), new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 8, 4), new ItemStack(magicalcrops.mod_mCrops.CropEssence, 1, 0), 5); + thermalexpansion.util.crafting.PulverizerManager.addRecipe(2400, OreDictionary.getOres("oreMCropsNetherEssence").get(0), new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 12, 4), new ItemStack(magicalcrops.mod_mCrops.CropEssence, 1, 0), 10); + } +} diff --git a/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java index 867dba9..c3ad665 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java @@ -1,7 +1,10 @@ package tppitweaks.recipetweaks.modTweaks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import tppitweaks.config.ConfigurationHandler; +import cpw.mods.fml.common.registry.GameRegistry; public class MagicropsTweaks { @@ -9,10 +12,29 @@ public static void init() { TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsXP.itemID, -1); } - + public static void registerOres() { - OreDictionary.registerOre("oreMCropsEssence", new ItemStack(magicalcrops.mod_mCrops.BlockOreEssence)); - OreDictionary.registerOre("oreMCropsNetherEssence", new ItemStack(magicalcrops.mod_mCrops.BlockOreEssenceNether)); + if (ConfigurationHandler.registerMagicalCropsOre) + { + OreDictionary.registerOre("oreMCropsEssence", new ItemStack(magicalcrops.mod_mCrops.BlockOreEssence)); + OreDictionary.registerOre("oreMCropsNetherEssence", new ItemStack(magicalcrops.mod_mCrops.BlockOreEssenceNether)); + } + } + + public static void addRecipes() + { + if (ConfigurationHandler.addEssenceSeedRecipe) + { + GameRegistry.addRecipe(new ItemStack(magicalcrops.mod_mCrops.mSeedsEssence), new Object[]{ + "wsw", + "sSs", + "wsw", + + 's', new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 1, 2), + 'w', new ItemStack(magicalcrops.mod_mCrops.MagicEssence), + 'S', Item.seeds + }); + } } } diff --git a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index a4edb06..335553a 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -1,10 +1,12 @@ package tppitweaks.recipetweaks.modTweaks; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.item.ModItems; +import java.util.ArrayList; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.OreDictionary; +import tppitweaks.config.ConfigurationHandler; +import tppitweaks.item.ModItems; import cpw.mods.fml.common.registry.GameRegistry; public class MekanismTweaks @@ -24,7 +26,7 @@ public static void init() public static void addRecipes() { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{ + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{ "AtA", "ADA", " o ", @@ -35,7 +37,7 @@ public static void addRecipes() 'A', mekanism.common.Mekanism.AtomicCore })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mekanism.common.Mekanism.AtomicCore), new Object[]{ + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicCore), new Object[]{ "aea", "ede", "aea", @@ -45,7 +47,7 @@ public static void addRecipes() 'd', Item.diamond })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tppiMaterial, 1, 2), new Object[]{ + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(ModItems.tppiMaterial, 1, 2), new Object[]{ "tst", "eae", "tst", @@ -55,5 +57,104 @@ public static void addRecipes() 'e', mekanism.common.Mekanism.EnergyUpgrade, 'a', mekanism.common.Mekanism.AtomicCore })); + + ArrayList oreIn = null, dustOut = null; + + if (!(oreIn = OreDictionary.getOres("oreAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreVinteum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustVinteum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreYellorite")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotYellorium")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemGreenSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustGreenSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } } } diff --git a/src/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java new file mode 100644 index 0000000..81955eb --- /dev/null +++ b/src/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java @@ -0,0 +1,27 @@ +package tppitweaks.recipetweaks.modTweaks; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.ShapedOreRecipe; +import cpw.mods.fml.common.registry.GameRegistry; + +public class ReliquaryTweaks +{ + public static void init() + { + TweakerBase.markItemForRecipeRemoval(xreliquary.items.XRItems.condensedPotion.itemID, 10); + } + + public static void addRecipes() + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(xreliquary.items.XRItems.condensedPotion, 1, 10), new Object[]{ + "sap", + "aap", + "ppp", + + 's', xreliquary.items.XRItems.condensedPotion, + 'a', Item.appleGold, + 'p', new ItemStack(Item.dyePowder, 1, 15) + })); + } +} From 27f1172f2eb34dc84cdaee1c8095801bb463ab8b Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 9 Feb 2014 21:49:43 -0500 Subject: [PATCH 12/15] NEI hard dependency because @Optional doesn't work and lex is dense --- src/codechicken/nei/api/INEIGuiHandler.java | 20 -------------------- src/tppitweaks/lib/Reference.java | 3 ++- 2 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 src/codechicken/nei/api/INEIGuiHandler.java diff --git a/src/codechicken/nei/api/INEIGuiHandler.java b/src/codechicken/nei/api/INEIGuiHandler.java deleted file mode 100644 index 94f44f3..0000000 --- a/src/codechicken/nei/api/INEIGuiHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -package codechicken.nei.api; - -import java.util.List; - -import codechicken.nei.VisiblityData; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; - -public interface INEIGuiHandler -{ - public int getItemSpawnSlot(GuiContainer gui, ItemStack item); - - public List getInventoryAreas(GuiContainer gui); - - public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button); - - public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h); - - public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility); -} diff --git a/src/tppitweaks/lib/Reference.java b/src/tppitweaks/lib/Reference.java index 7f98710..d9b93cc 100644 --- a/src/tppitweaks/lib/Reference.java +++ b/src/tppitweaks/lib/Reference.java @@ -35,7 +35,8 @@ public class Reference + "after:powersuitaddons;" + "after:powersuits;" + "after:Mekanism;" - + "after:xreliquary"; + + "after:xreliquary;" + + "required-after:NotEnoughItems"; public static final String PACK_VERSION = "0.2.2"; } From 250ef50c31e6ee13d4c271676d0df081c4605834 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 11 Feb 2014 02:36:15 -0500 Subject: [PATCH 13/15] Add pack info to config because it always should have been there --- .../config/ConfigurationHandler.java | 4 + src/tppitweaks/event/TPPIEventHandler.java | 365 +++++++++--------- src/tppitweaks/lib/Reference.java | 86 +++-- 3 files changed, 233 insertions(+), 222 deletions(-) diff --git a/src/tppitweaks/config/ConfigurationHandler.java b/src/tppitweaks/config/ConfigurationHandler.java index 2950406..0bc7bef 100644 --- a/src/tppitweaks/config/ConfigurationHandler.java +++ b/src/tppitweaks/config/ConfigurationHandler.java @@ -137,6 +137,10 @@ public static void init(File file) Reference.TTFilename = config.get("Mod Loading Tweaks", "ThaumicTinkerer_filename", Reference.DEFAULT_TT_FILENAME, "The filename for Thaumic Tinkerer to use to check for its presence and disable/enable it automatically").getString(); Reference.KAMIFilename = config.get("Mod Loading Tweaks", "KAMI_filename", Reference.DEFAULT_KAMI_FILENAME, "The filename for KAMI to use to check for its presence and disable/enable it automatically").getString(); + Reference.packName = config.get("Pack Info", "packName", "Test Pack Please Ignore", "The full name of the pack").getString(); + Reference.packVersion = config.get("Pack Info", "packVerison", "0.0.1", "The version of the pack").getString(); + Reference.packAcronym = config.get("Pack Info", "packAcronym", "TPPI", "The acronym of the pack (required, can be the same as name)").getString(); + config.save(); } diff --git a/src/tppitweaks/event/TPPIEventHandler.java b/src/tppitweaks/event/TPPIEventHandler.java index d4b07cb..f93540e 100644 --- a/src/tppitweaks/event/TPPIEventHandler.java +++ b/src/tppitweaks/event/TPPIEventHandler.java @@ -1,181 +1,186 @@ -package tppitweaks.event; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; - -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.client.event.GuiOpenEvent; -import net.minecraftforge.event.ForgeSubscribe; -import net.minecraftforge.event.entity.EntityJoinWorldEvent; -import net.minecraftforge.event.entity.living.LivingDeathEvent; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import tppitweaks.TPPITweaks; -import tppitweaks.client.gui.GuiHelper; -import tppitweaks.client.gui.UpdateGui; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.lib.Reference; -import tppitweaks.recipetweaks.RecipeTweaks; -import tppitweaks.recipetweaks.modTweaks.DATweaks; - -import com.google.common.collect.ImmutableList; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class TPPIEventHandler -{ - private boolean shouldLoadGUI = true; - - public static boolean NBTValOnDeath; - - @SideOnly(Side.CLIENT) - @ForgeSubscribe - public void onGui(GuiOpenEvent event) - { - if (event.gui instanceof GuiMainMenu) - { - - if (shouldLoadGUI && ConfigurationHandler.showDownloadGUI) - { - event.gui = new UpdateGui(event.gui, true); - GuiHelper.updateGui = (UpdateGui) event.gui; - shouldLoadGUI = false; - - ConfigurationHandler.stopShowingGUI(); - } - else - { - Field f = null; - try - { - f = FMLCommonHandler.class.getDeclaredField("brandings"); - } - catch (Exception e) - { - e.printStackTrace(); - TPPITweaks.logger.log(Level.WARNING, "Reflection error, TPPI watermark will not be shown"); - return; - } - - f.setAccessible(true); - try - { - if (f.get(FMLCommonHandler.instance()) == null) - { - FMLCommonHandler.instance().computeBranding(); - doThisAgain(); - } - else - { - addStuff(f); - } - } - catch (Exception e) - { - e.printStackTrace(); - TPPITweaks.logger.log(Level.WARNING, "Reflection error, TPPI watermark will not be shown"); - } - } - } - } - - private void doThisAgain() - { - Field f = null; - try - { - f = FMLCommonHandler.class.getDeclaredField("brandings"); - } - catch (Exception e) - { - e.printStackTrace(); - TPPITweaks.logger.log(Level.WARNING, "Reflection error, TPPI watermark will not be shown"); - } - - addStuff(f); - } - - @SuppressWarnings("unchecked") - private void addStuff(Field f) - { - f.setAccessible(true); - try - { - ImmutableList list = (ImmutableList) f.get(FMLCommonHandler.instance()); - List newList = new ArrayList(); - - for (String s : list) - { - if (s.contains("Feed")) - { - // Do nothing - } - else if (s.equals("Test Pack Please Ignore " + Reference.PACK_VERSION)) - { - // Do nothing - } - else if (s.contains("Forge") && !s.contains(":")) - { - String[] sa = s.split(" "); - String firstLine = sa[0] + " " + sa[1]; - String secondLine = sa[2]; - newList.add(firstLine + ":"); - newList.add(" " + secondLine); - } - else - newList.add(s); - } - - newList.add("Test Pack Please Ignore " + Reference.PACK_VERSION); - - f.set(FMLCommonHandler.instance(), ImmutableList.copyOf(newList)); - } - catch (Exception e) - { - e.printStackTrace(); - TPPITweaks.logger.log(Level.WARNING, "Reflection error, TPPI watermark will not be shown"); - } - } - - @ForgeSubscribe - public void onLivingDeath(LivingDeathEvent event) - { - EntityPlayer entityPlayer; - if (event.entityLiving instanceof EntityPlayer) - { - TPPITweaks.logger.log(Level.INFO, "getting NBT"); - entityPlayer = (EntityPlayer) event.entityLiving; - - NBTValOnDeath = entityPlayer.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook"); - } - } - - public NBTTagCompound getTag(EntityPlayer entity, boolean useClassVal) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setBoolean("hasBook", useClassVal ? NBTValOnDeath : true); - - return tag; - } - - @ForgeSubscribe - public void onItemTooltip(ItemTooltipEvent event) - { - if (Loader.isModLoaded("DimensionalAnchors") && !Loader.isModLoaded("ChickenChunks")) - { - DATweaks.addTooltip(event); - } - } - - @ForgeSubscribe - public void onPlayerJoin(EntityJoinWorldEvent event) { - if (!RecipeTweaks.recipesInitialized) - RecipeTweaks.doPlayerJoinRecipeTweaks(); - } +package tppitweaks.event; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; + +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.living.LivingDeathEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import tppitweaks.TPPITweaks; +import tppitweaks.client.gui.GuiHelper; +import tppitweaks.client.gui.UpdateGui; +import tppitweaks.config.ConfigurationHandler; +import tppitweaks.lib.Reference; +import tppitweaks.recipetweaks.RecipeTweaks; +import tppitweaks.recipetweaks.modTweaks.DATweaks; + +import com.google.common.collect.ImmutableList; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class TPPIEventHandler +{ + private boolean shouldLoadGUI = true; + + public static boolean NBTValOnDeath; + private String name, version, acronym; + + @SideOnly(Side.CLIENT) + @ForgeSubscribe + public void onGui(GuiOpenEvent event) + { + if (event.gui instanceof GuiMainMenu) + { + + if (shouldLoadGUI && ConfigurationHandler.showDownloadGUI) + { + event.gui = new UpdateGui(event.gui, true); + GuiHelper.updateGui = (UpdateGui) event.gui; + shouldLoadGUI = false; + + ConfigurationHandler.stopShowingGUI(); + } + else + { + name = Reference.packName; + version = Reference.packVersion; + acronym = Reference.packAcronym; + + Field f = null; + try + { + f = FMLCommonHandler.class.getDeclaredField("brandings"); + } + catch (Exception e) + { + e.printStackTrace(); + TPPITweaks.logger.log(Level.WARNING, "Reflection error, " + acronym + " watermark will not be shown"); + return; + } + + f.setAccessible(true); + try + { + if (f.get(FMLCommonHandler.instance()) == null) + { + FMLCommonHandler.instance().computeBranding(); + doThisAgain(); + } + else + { + addStuff(f); + } + } + catch (Exception e) + { + e.printStackTrace(); + TPPITweaks.logger.log(Level.WARNING, "Reflection error, " + acronym + " watermark will not be shown"); + } + } + } + } + + private void doThisAgain() + { + Field f = null; + try + { + f = FMLCommonHandler.class.getDeclaredField("brandings"); + } + catch (Exception e) + { + e.printStackTrace(); + TPPITweaks.logger.log(Level.WARNING, "Reflection error, " + acronym + " watermark will not be shown"); + } + + addStuff(f); + } + + @SuppressWarnings("unchecked") + private void addStuff(Field f) + { + f.setAccessible(true); + try + { + ImmutableList list = (ImmutableList) f.get(FMLCommonHandler.instance()); + List newList = new ArrayList(); + + for (String s : list) + { + if (s.contains("Feed")) + { + // Do nothing + } + else if (s.equals(name + " " + version)) + { + // Do nothing + } + else if (s.contains("Forge") && !s.contains(":")) + { + String[] sa = s.split(" "); + String firstLine = sa[0] + " " + sa[1]; + String secondLine = sa[2]; + newList.add(firstLine + ":"); + newList.add(" " + secondLine); + } + else + newList.add(s); + } + + newList.add(name + " " + version); + + f.set(FMLCommonHandler.instance(), ImmutableList.copyOf(newList)); + } + catch (Exception e) + { + e.printStackTrace(); + TPPITweaks.logger.log(Level.WARNING, "Reflection error, " + acronym + " watermark will not be shown"); + } + } + + @ForgeSubscribe + public void onLivingDeath(LivingDeathEvent event) + { + EntityPlayer entityPlayer; + if (event.entityLiving instanceof EntityPlayer) + { + TPPITweaks.logger.log(Level.INFO, "getting NBT"); + entityPlayer = (EntityPlayer) event.entityLiving; + + NBTValOnDeath = entityPlayer.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook"); + } + } + + public NBTTagCompound getTag(EntityPlayer entity, boolean useClassVal) + { + NBTTagCompound tag = new NBTTagCompound(); + tag.setBoolean("hasBook", useClassVal ? NBTValOnDeath : true); + + return tag; + } + + @ForgeSubscribe + public void onItemTooltip(ItemTooltipEvent event) + { + if (Loader.isModLoaded("DimensionalAnchors") && !Loader.isModLoaded("ChickenChunks")) + { + DATweaks.addTooltip(event); + } + } + + @ForgeSubscribe + public void onPlayerJoin(EntityJoinWorldEvent event) { + if (!RecipeTweaks.recipesInitialized) + RecipeTweaks.doPlayerJoinRecipeTweaks(); + } } \ No newline at end of file diff --git a/src/tppitweaks/lib/Reference.java b/src/tppitweaks/lib/Reference.java index d9b93cc..f4dd12a 100644 --- a/src/tppitweaks/lib/Reference.java +++ b/src/tppitweaks/lib/Reference.java @@ -1,42 +1,44 @@ -package tppitweaks.lib; - -import java.io.File; - -public class Reference -{ - public static final String CHANNEL = "tppitweaks"; - public static final String TAB_NAME = "tabTPPI"; - public static String thaumcraftFilename = "Thaumcraft4.0.5b.zip"; - public static String TTFilename = "ThaumicTinkerer 2.1-67.jar"; - public static String KAMIFilename = "ThaumicTinkererKAMI_j6.jar"; - - public static final String DEFAULT_THAUMCRAFT_FILENAME = "Thaumcraft4.0.5b.zip"; - public static final String DEFAULT_TT_FILENAME = "ThaumicTinkerer 2.1-67.jar"; - public static final String DEFAULT_KAMI_FILENAME = "ThaumicTinkererKAMI_j6.jar"; - - public static File modsFolder; - - public static final String DEPENDENCIES = - "before:ThaumicTinkerer;" - + "after:Thaumcraft;" - + "after:TwilightForest;" - + "after:AppliedEnergistics;" - + "after:StevesFactoryManager;" - + "after:DimensionalAnchors;" - + "after:DartCraft;" - + "after:arsmagica2;" - + "after:ThermalExpansion;" - + "after:magicalcrops;" - + "after:gregtech_addon;" - + "after:ExtraUtilities;" - + "after:EnderStorage;" - + "after:BigReactors;" - + "after:BuildCraft|Core;" - + "after:powersuitaddons;" - + "after:powersuits;" - + "after:Mekanism;" - + "after:xreliquary;" - + "required-after:NotEnoughItems"; - - public static final String PACK_VERSION = "0.2.2"; -} +package tppitweaks.lib; + +import java.io.File; + +public class Reference +{ + public static final String CHANNEL = "tppitweaks"; + public static final String TAB_NAME = "tabTPPI"; + public static String thaumcraftFilename = "Thaumcraft4.0.5b.zip"; + public static String TTFilename = "ThaumicTinkerer 2.1-67.jar"; + public static String KAMIFilename = "ThaumicTinkererKAMI_j6.jar"; + + public static final String DEFAULT_THAUMCRAFT_FILENAME = "Thaumcraft4.0.5b.zip"; + public static final String DEFAULT_TT_FILENAME = "ThaumicTinkerer 2.1-67.jar"; + public static final String DEFAULT_KAMI_FILENAME = "ThaumicTinkererKAMI_j6.jar"; + + public static File modsFolder; + + public static final String DEPENDENCIES = + "before:ThaumicTinkerer;" + + "after:Thaumcraft;" + + "after:TwilightForest;" + + "after:AppliedEnergistics;" + + "after:StevesFactoryManager;" + + "after:DimensionalAnchors;" + + "after:DartCraft;" + + "after:arsmagica2;" + + "after:ThermalExpansion;" + + "after:magicalcrops;" + + "after:gregtech_addon;" + + "after:ExtraUtilities;" + + "after:EnderStorage;" + + "after:BigReactors;" + + "after:BuildCraft|Core;" + + "after:powersuitaddons;" + + "after:powersuits;" + + "after:Mekanism;" + + "after:xreliquary;" + + "required-after:NotEnoughItems"; + + public static String packName = "Test Pack Please Ignore"; + public static String packVersion = "0.2.2"; + public static String packAcronym = "TPPI"; +} From c17ff382d9edc8077c06a218de4d2c653b100cb5 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 11 Feb 2014 17:51:21 -0500 Subject: [PATCH 14/15] One down, one to go. --- src/tppitweaks/client/gui/UpdateGui.java | 319 +++++++++++------------ 1 file changed, 157 insertions(+), 162 deletions(-) diff --git a/src/tppitweaks/client/gui/UpdateGui.java b/src/tppitweaks/client/gui/UpdateGui.java index de048d7..23bcd39 100644 --- a/src/tppitweaks/client/gui/UpdateGui.java +++ b/src/tppitweaks/client/gui/UpdateGui.java @@ -1,162 +1,157 @@ -package tppitweaks.client.gui; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.logging.Level; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.util.ChatMessageComponent; - -import org.lwjgl.input.Keyboard; - -import tppitweaks.TPPITweaks; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class UpdateGui extends GuiScreen -{ - protected GuiScreen parentScreen; - private boolean noShow = true, firstTime; - - List modScreens = new ArrayList(); - Iterator iterator; - ConfigGui configGui = null; - - public void initModInstallationMenus() - { - - if (!Loader.isModLoaded("Thaumcraft")) - modScreens.add(new InstructionsGui(new ModDownload("Thaumcraft 4", "http://adf.ly/1311628/thaumcraft-4", "Thaumcraft"))); - - if (!Loader.isModLoaded("TwilightForest")) - modScreens.add(new InstructionsGui(new ModDownload("Twilight Forest", "http://adf.ly/Zvi5J", "TwilightForest"))); - - iterator = modScreens.iterator(); - - configGui = new ConfigGui(); - - } - - public UpdateGui(GuiScreen parentScreen, boolean firstTime) - { - this.parentScreen = parentScreen; - - initModInstallationMenus(); - - if (modScreens.isEmpty() && !firstTime) - Minecraft.getMinecraft().thePlayer.sendChatToPlayer(new ChatMessageComponent().addText("You have all optional mods installed!")); - - for (InstructionsGui g : modScreens) - { - if (!Loader.isModLoaded(g.mod.modid)) - noShow = false; - } - - this.firstTime = firstTime; - } - - @SuppressWarnings("unchecked") - @Override - public void initGui() - { - if (noShow) - { - System.out.println("not opening GUI"); - this.mc.displayGuiScreen(this.parentScreen); - return; - } - else - { - - } - - // Unsure exactly what this does but...it seems necessary - Keyboard.enableRepeatEvents(true); - - this.buttonList.clear(); - - this.buttonList.add(new GuiButton(-1, this.width / 2 - 150, this.height / 2 + 30, 300, 20, "Continue")); - this.buttonList.add(new GuiButton(11, this.width / 2 - 150, this.height / 2 + 65, 300, 20, "Skip the downloads completely")); - } - - @Override - public void onGuiClosed() - { - Keyboard.enableRepeatEvents(false); - } - - @Override - protected void actionPerformed(GuiButton button) - { - if (button.enabled) - { - if (button.id == 11) - this.mc.displayGuiScreen(this.parentScreen); - else - { - try - { - if (GuiHelper.updateGui.iterator.hasNext()) - { - this.mc.displayGuiScreen(GuiHelper.updateGui.iterator.next()); - } - /* - else if (configGui != null) - { - File file=new File("config/TPPI/config/hardconfig.zip"); - if (file.exists()) this.mc.displayGuiScreen(configGui); - configGui = null; - } - */ - else if (GuiHelper.updateGui.modScreens.size() > 0) - { - this.mc.displayGuiScreen(new RestartGui()); - } - else - { - this.mc.displayGuiScreen(this.parentScreen); - } - } - catch (Exception e) - { - TPPITweaks.logger.log(Level.SEVERE, "Error opening webpage, please contact TPPI Team."); - e.printStackTrace(); - } - } - } - } - - @Override - public void drawScreen(int par1, int par2, float par3) - { - drawScreen(par1, par2, par3, true); - } - - public void drawScreen(int par1, int par2, float par3, boolean draw) - { - if (draw) - { - this.drawDefaultBackground(); - - if (firstTime) - { - this.drawCenteredString(this.fontRenderer, "Hey there! This seems like the first time you are starting TPPI. Welcome!", this.width / 2, this.height / 2 - 100, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "This menu will not show again unless enabled in the TPPI Tweaks config.", this.width / 2, this.height / 2 - 10, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "Alternatively, you may use the command \"/tppi download\" to show it in-game.", this.width / 2, this.height / 2, 0xFFFFFF); - } - - this.drawCenteredString(this.fontRenderer, "As it turns out, there are some mods we really wanted to include,", this.width / 2, this.height / 2 - 80, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "but couldn't ship directly with the rest of the pack.", this.width / 2, this.height / 2 - 70, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "Though we had to leave them out, we built this little utility to", this.width / 2, this.height / 2 - 50, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "help you all add them manually, to gain what we feel is the full TPPI experience.", this.width / 2, this.height / 2 - 40, 0xFFFFFF); - - } - - super.drawScreen(par1, par2, par3); - } -} +package tppitweaks.client.gui; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.logging.Level; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.util.ChatMessageComponent; + +import org.lwjgl.input.Keyboard; + +import tppitweaks.TPPITweaks; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class UpdateGui extends GuiScreen +{ + protected GuiScreen parentScreen; + private boolean noShow = true, firstTime; + + List modScreens = new ArrayList(); + Iterator iterator; + ConfigGui configGui = null; + + public void initModInstallationMenus() + { + if (!Loader.isModLoaded("TwilightForest")) + modScreens.add(new InstructionsGui(new ModDownload("Twilight Forest", "http://adf.ly/Zvi5J", "TwilightForest"))); + + iterator = modScreens.iterator(); + + configGui = new ConfigGui(); + } + + public UpdateGui(GuiScreen parentScreen, boolean firstTime) + { + this.parentScreen = parentScreen; + + initModInstallationMenus(); + + if (modScreens.isEmpty() && !firstTime) + Minecraft.getMinecraft().thePlayer.sendChatToPlayer(new ChatMessageComponent().addText("You have all optional mods installed!")); + + for (InstructionsGui g : modScreens) + { + if (!Loader.isModLoaded(g.mod.modid)) + noShow = false; + } + + this.firstTime = firstTime; + } + + @SuppressWarnings("unchecked") + @Override + public void initGui() + { + if (noShow) + { + System.out.println("not opening GUI"); + this.mc.displayGuiScreen(this.parentScreen); + return; + } + else + { + + } + + // Unsure exactly what this does but...it seems necessary + Keyboard.enableRepeatEvents(true); + + this.buttonList.clear(); + + this.buttonList.add(new GuiButton(-1, this.width / 2 - 150, this.height / 2 + 30, 300, 20, "Continue")); + this.buttonList.add(new GuiButton(11, this.width / 2 - 150, this.height / 2 + 65, 300, 20, "Skip the downloads completely")); + } + + @Override + public void onGuiClosed() + { + Keyboard.enableRepeatEvents(false); + } + + @Override + protected void actionPerformed(GuiButton button) + { + if (button.enabled) + { + if (button.id == 11) + this.mc.displayGuiScreen(this.parentScreen); + else + { + try + { + if (GuiHelper.updateGui.iterator.hasNext()) + { + this.mc.displayGuiScreen(GuiHelper.updateGui.iterator.next()); + } + /* + else if (configGui != null) + { + File file=new File("config/TPPI/config/hardconfig.zip"); + if (file.exists()) this.mc.displayGuiScreen(configGui); + configGui = null; + } + */ + else if (GuiHelper.updateGui.modScreens.size() > 0) + { + this.mc.displayGuiScreen(new RestartGui()); + } + else + { + this.mc.displayGuiScreen(this.parentScreen); + } + } + catch (Exception e) + { + TPPITweaks.logger.log(Level.SEVERE, "Error opening webpage, please contact TPPI Team."); + e.printStackTrace(); + } + } + } + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + drawScreen(par1, par2, par3, true); + } + + public void drawScreen(int par1, int par2, float par3, boolean draw) + { + if (draw) + { + this.drawDefaultBackground(); + + if (firstTime) + { + this.drawCenteredString(this.fontRenderer, "Hey there! This seems like the first time you are starting TPPI. Welcome!", this.width / 2, this.height / 2 - 100, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "This menu will not show again unless enabled in the TPPI Tweaks config.", this.width / 2, this.height / 2 - 10, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "Alternatively, you may use the command \"/tppi download\" to show it in-game.", this.width / 2, this.height / 2, 0xFFFFFF); + } + + this.drawCenteredString(this.fontRenderer, "As it turns out, there are some mods we really wanted to include,", this.width / 2, this.height / 2 - 80, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "but couldn't ship directly with the rest of the pack.", this.width / 2, this.height / 2 - 70, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "Though we had to leave them out, we built this little utility to", this.width / 2, this.height / 2 - 50, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "help you all add them manually, to gain what we feel is the full TPPI experience.", this.width / 2, this.height / 2 - 40, 0xFFFFFF); + + } + + super.drawScreen(par1, par2, par3); + } +} From 8cdda8f3c509a566ed5c3e46b4360a9384ff3d93 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 11 Feb 2014 19:38:22 -0500 Subject: [PATCH 15/15] Remove digital miner recipe (TEMPORARY) --- .../modTweaks/MekanismTweaks.java | 321 +++++++++--------- 1 file changed, 161 insertions(+), 160 deletions(-) diff --git a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 335553a..6dfb41c 100644 --- a/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -1,160 +1,161 @@ -package tppitweaks.recipetweaks.modTweaks; - -import java.util.ArrayList; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.item.ModItems; -import cpw.mods.fml.common.registry.GameRegistry; - -public class MekanismTweaks -{ - public static void init() - { - if (ConfigurationHandler.harderDisassemblerRecipe) - { - TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicDisassembler).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicCore).itemID, -1); - } - if (ConfigurationHandler.disableCardboardBox) - { - TweakerBase.markItemForRecipeRemoval(mekanism.common.Mekanism.cardboardBoxID, -1); - } - } - - public static void addRecipes() - { - GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{ - "AtA", - "ADA", - " o ", - - 'D', new ItemStack(ModItems.tppiMaterial, 1, 2), - 't', new ItemStack(mekanism.common.Mekanism.EnergyTablet, 1, 1), - 'o', "ingotRefinedObsidian", - 'A', mekanism.common.Mekanism.AtomicCore - })); - - GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicCore), new Object[]{ - "aea", - "ede", - "aea", - - 'a', mekanism.common.Mekanism.EnrichedAlloy, - 'e', mekanism.common.Mekanism.ElectrolyticCore, - 'd', Item.diamond - })); - - GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(ModItems.tppiMaterial, 1, 2), new Object[]{ - "tst", - "eae", - "tst", - - 't', mekanism.common.Mekanism.TeleportationCore, - 's', mekanism.common.Mekanism.SpeedUpgrade, - 'e', mekanism.common.Mekanism.EnergyUpgrade, - 'a', mekanism.common.Mekanism.AtomicCore - })); - - ArrayList oreIn = null, dustOut = null; - - if (!(oreIn = OreDictionary.getOres("oreAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("oreVinteum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustVinteum")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("oreYellorite")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("oreRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("oreSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("oreOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - out.stackSize++; - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("ingotYellorium")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("gemRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("gemSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("gemGreenSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustGreenSapphire")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("gemOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - - if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) - { - ItemStack out = dustOut.get(0).copy(); - for (ItemStack i : oreIn) - mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); - } - } -} +package tppitweaks.recipetweaks.modTweaks; + +import java.util.ArrayList; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import tppitweaks.config.ConfigurationHandler; +import tppitweaks.item.ModItems; +import cpw.mods.fml.common.registry.GameRegistry; + +public class MekanismTweaks +{ + public static void init() + { + if (ConfigurationHandler.harderDisassemblerRecipe) + { + TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicDisassembler).itemID, -1); + TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicCore).itemID, -1); + } + if (ConfigurationHandler.disableCardboardBox) + { + TweakerBase.markItemForRecipeRemoval(mekanism.common.Mekanism.cardboardBoxID, -1); + } + TweakerBase.markItemForRecipeRemoval(mekanism.common.Mekanism.machineBlockID, 4); + } + + public static void addRecipes() + { + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{ + "AtA", + "ADA", + " o ", + + 'D', new ItemStack(ModItems.tppiMaterial, 1, 2), + 't', new ItemStack(mekanism.common.Mekanism.EnergyTablet, 1, 1), + 'o', "ingotRefinedObsidian", + 'A', mekanism.common.Mekanism.AtomicCore + })); + + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.AtomicCore), new Object[]{ + "aea", + "ede", + "aea", + + 'a', mekanism.common.Mekanism.EnrichedAlloy, + 'e', mekanism.common.Mekanism.ElectrolyticCore, + 'd', Item.diamond + })); + + GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(ModItems.tppiMaterial, 1, 2), new Object[]{ + "tst", + "eae", + "tst", + + 't', mekanism.common.Mekanism.TeleportationCore, + 's', mekanism.common.Mekanism.SpeedUpgrade, + 'e', mekanism.common.Mekanism.EnergyUpgrade, + 'a', mekanism.common.Mekanism.AtomicCore + })); + + ArrayList oreIn = null, dustOut = null; + + if (!(oreIn = OreDictionary.getOres("oreAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreVinteum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustVinteum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreYellorite")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("oreOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + out.stackSize++; + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addEnrichmentChamberRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotYellorium")).isEmpty() && !(dustOut = OreDictionary.getOres("dustYellorium")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemRuby")).isEmpty() && !(dustOut = OreDictionary.getOres("dustRuby")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemGreenSapphire")).isEmpty() && !(dustOut = OreDictionary.getOres("dustGreenSapphire")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("gemOlivine")).isEmpty() && !(dustOut = OreDictionary.getOres("dustOlivine")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + + if (!(oreIn = OreDictionary.getOres("ingotAluminum")).isEmpty() && !(dustOut = OreDictionary.getOres("dustAluminum")).isEmpty()) + { + ItemStack out = dustOut.get(0).copy(); + for (ItemStack i : oreIn) + mekanism.common.recipe.RecipeHandler.addCrusherRecipe(i.copy(), out); + } + } +}