From 6c8a3e534e8be93af7d8865965d9a078a1730476 Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Wed, 21 May 2014 14:42:43 -0400 Subject: [PATCH 01/30] Change recipe for EnderStorage items Now only requires resonant strongbox/tank. Config options changed to reflect this. --- .../config/ConfigurationHandler.java | 8 ++-- .../modTweaks/BigReactorsTweaks.java | 1 - .../modTweaks/EnderStorageTweaks.java | 48 +++++++++++++------ 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 0268d51..a9914e3 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -29,9 +29,9 @@ public class ConfigurationHandler public static String supportedModsName; public static int guideSkin; - public static boolean enderChestTesseract; + public static boolean enderChestResonant; public static boolean enderPouchNerf; - public static boolean enderTankTesseract; + public static boolean enderTankResonant; public static boolean steelReactorCasings; public static boolean glassFuelRods; public static boolean twoReactorGlass; @@ -121,9 +121,9 @@ public static void init(File file) guideSkin = config.get("TPPI Guide Info", "TPPIGuideSkin", 0, "The skin of the guide GUI/item, 0=tech, 1=scroll").getInt(); doSpawnBook = config.get("TPPI Guide Info", "doSpawnBook", true, "Whether or not to give the player a welcome book on first spawn").getBoolean(true); - enderChestTesseract = config.get("Ender Storage Tweaks", "enderChestTesseract", true, "EnderStorage Ender Chests require tesseracts instead of ender pearls.").getBoolean(true); + enderChestResonant = config.get("Ender Storage Tweaks", "enderChestResonant", true, "EnderStorage Ender Chests require resonant strongboxes instead of ender pearls.").getBoolean(true); enderPouchNerf = config.get("Ender Storage Tweaks", "enderPouchNerf", true, "EnderStorage Ender Pouches require pyrotheum dust and liquid ender instead of blaze rods and ender pearls.").getBoolean(true); - enderTankTesseract = config.get("Ender Storage Tweaks", "enderTankTesseract", true, "EnderStorage Ender Tanks require tesseracts instead of ender pearls.").getBoolean(true); + enderTankResonant = config.get("Ender Storage Tweaks", "enderTankResonant", true, "EnderStorage Ender Tanks require resonant portable tanks instead of ender pearls.").getBoolean(true); steelReactorCasings = config.get("Other Mod Tweaks", "steelReactorCasings", false, "Big Reactors reactor casings require steel. Affects ONLY the casings.").getBoolean(true); ic2TEGlassInterchangeability = config.get("Other Mod Tweaks", "ic2TEGlassInterchangeability", true, "IC2 reinforced glass (glassReinforced) and Thermal Expansion hardened glass (glassHardened)\nwill be cross-registered as each other in the ore dictionary.").getBoolean(false); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java index f50ea52..5a42edb 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java @@ -1,7 +1,6 @@ package tppitweaks.recipetweaks.modTweaks; 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; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index ca7d21e..91b08c2 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -14,7 +14,7 @@ public class EnderStorageTweaks extends TweakingRegistry @RecipeRemoval(requiredModids={"EnderStorage", "ThermalExpansion"}) public static void init() { - TweakingRegistry.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1, TweakingAction.CHANGED, "Recipe requires tesseract", "because it is better than one", "and requires midgame materials"); + TweakingRegistry.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1, TweakingAction.CHANGED, "Recipe requires resonant strongbox", "because it is better than one", "and requires midgame materials"); if (ConfigurationHandler.enderPouchNerf) TweakingRegistry.markItemForRecipeRemoval(((Item) codechicken.enderstorage.EnderStorage.itemEnderPouch).itemID, -1, TweakingAction.CHANGED, "Recipe requires pyrotheum+ender bucket", "so it requires midgame infrastructure"); } @@ -22,28 +22,46 @@ public static void init() @RecipeAddition(requiredModids={"EnderStorage", "ThermalExpansion"}) public static void addRecipes() { - Object chestEnderElement = ConfigurationHandler.enderChestTesseract ? thermalexpansion.block.TEBlocks.blockTesseract : Item.enderPearl; - Object tankEnderElement = ConfigurationHandler.enderTankTesseract ? thermalexpansion.block.TEBlocks.blockTesseract : Item.enderPearl; + ItemStack chestEnderElement = (ItemStack) (ConfigurationHandler.enderChestResonant ? new ItemStack(thermalexpansion.block.TEBlocks.blockStrongbox, 1, 4) : Item.enderPearl); + ItemStack tankEnderElement = (ItemStack) (ConfigurationHandler.enderTankResonant ? new ItemStack(thermalexpansion.block.TEBlocks.blockTank, 1, 4) : Item.enderPearl); for (int i = 0; i < 16; i++) { - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), new Object[] { "bWb", "OCO", "bpb", 'b', Item.blazeRod, 'p', - chestEnderElement, 'O', Block.obsidian, 'C', Block.chest, 'W', new ItemStack(Block.cloth, 1, i) }); + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), + "bWb", + "OCO", + "bpb", - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), new Object[] { "bWb", "OCO", "bpb", 'b', - Item.blazeRod, 'p', tankEnderElement, 'O', Block.obsidian, 'C', Item.cauldron, 'W', new ItemStack(Block.cloth, 1, i) }); + 'b', Item.blazeRod, + 'p', chestEnderElement, + 'O', Block.obsidian, + 'C', Block.chest, + 'W', new ItemStack(Block.cloth, 1, i) + ); + + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), + "bWb", + "OCO", + "bpb", + + 'b', Item.blazeRod, + 'p', tankEnderElement, + 'O', Block.obsidian, + 'C', Item.cauldron, + 'W', new ItemStack(Block.cloth, 1, i) + ); if (ConfigurationHandler.enderPouchNerf) { GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.itemEnderPouch, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), - "pWp", - "lel", - "plp", - - 'p', thermalexpansion.item.TEItems.dustPyrotheum, - 'l', Item.leather, - 'e', new ItemStack(thermalexpansion.fluid.TEFluids.itemBucket, 1, 2), - 'W', new ItemStack(Block.cloth, 1, i) + "pWp", + "lel", + "plp", + + 'p', thermalexpansion.item.TEItems.dustPyrotheum, + 'l', Item.leather, + 'e', new ItemStack(thermalexpansion.fluid.TEFluids.itemBucket, 1, 2), + 'W', new ItemStack(Block.cloth, 1, i) ); } } From 07b502b5805db1dd8fe9d764b76f731c309c4b7a Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Mon, 26 May 2014 17:49:14 -0400 Subject: [PATCH 02/30] Hopefully fix bad stacktraces on recipe tweaks error. --- gradlew | 0 src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 gradlew diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java index 7b2e19b..557b655 100644 --- a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java @@ -1,8 +1,10 @@ package tppitweaks.recipetweaks; +import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Set; @@ -93,8 +95,7 @@ public static void removeRecipes() catch (Throwable t) { TPPITweaks.logger.severe("Could not perform recipe removals. This is a serious error!"); - t.printStackTrace(); - throw new RuntimeException("Recipe tweaks failed."); + throw new RuntimeException(t); } TweakingRegistry.removeRecipes(); @@ -123,8 +124,7 @@ public static void addRecipes(EventTime time) catch (Throwable t) { TPPITweaks.logger.severe("Could not perform recipe additions. This is a serious error!"); - t.printStackTrace(); - throw new RuntimeException("Recipe tweaks failed."); + throw new RuntimeException(t); } } From fb9f0cd71d76241f3de7e2bca4026f5d48ed8bfd Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 27 May 2014 13:56:09 -0400 Subject: [PATCH 03/30] Add shapeless recipe for flint and steel, because yes. --- src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java index 7b2e19b..e4298ab 100644 --- a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java @@ -67,7 +67,8 @@ private static void doOreDictTweaks() private static void addMiscRecipes() { - GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint})); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "nuggetSteel", Item.flint)); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "ingotIron", Item.flint)); } public static void removeRecipes() From bcf8e63b588e4084e55c656a90b6d0d208f1cea4 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 28 May 2014 00:05:10 -0400 Subject: [PATCH 04/30] Disable Ender Tanks due to very serious dupe bug. --- .../config/ConfigurationHandler.java | 2 + .../tppitweaks/recipetweaks/RecipeTweaks.java | 2 - .../modTweaks/EnderStorageTweaks.java | 51 +++++++++++-------- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index c75fcba..ab3772c 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -35,6 +35,7 @@ public class ConfigurationHandler public static boolean enderChestTesseract; public static boolean enderPouchNerf; public static boolean enderTankTesseract; + public static boolean disableEnderTank; public static boolean steelReactorCasings; public static boolean glassFuelRods; public static boolean twoReactorGlass; @@ -128,6 +129,7 @@ public static void init(File file) enderChestTesseract = config.get("Ender Storage Tweaks", "enderChestTesseract", true, "EnderStorage Ender Chests require tesseracts instead of ender pearls.").getBoolean(true); enderPouchNerf = config.get("Ender Storage Tweaks", "enderPouchNerf", true, "EnderStorage Ender Pouches require pyrotheum dust and liquid ender instead of blaze rods and ender pearls.").getBoolean(true); enderTankTesseract = config.get("Ender Storage Tweaks", "enderTankTesseract", true, "EnderStorage Ender Tanks require tesseracts instead of ender pearls.").getBoolean(true); + disableEnderTank = config.get("Ender Storage Tweaks", "disableEnderTank", true, "Disables the ender tank. Setting this to false opens your game/server to dupes, be warned!").getBoolean(true); steelReactorCasings = config.get("Other Mod Tweaks", "steelReactorCasings", false, "Big Reactors reactor casings require steel. Affects ONLY the casings.").getBoolean(true); ic2TEGlassInterchangeability = config.get("Other Mod Tweaks", "ic2TEGlassInterchangeability", true, "IC2 reinforced glass (glassReinforced) and Thermal Expansion hardened glass (glassHardened)\nwill be cross-registered as each other in the ore dictionary.").getBoolean(false); diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java index 9ab83a3..3a92dc7 100644 --- a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java @@ -1,10 +1,8 @@ package tppitweaks.recipetweaks; -import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Set; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index ca7d21e..109c4f9 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -1,5 +1,6 @@ package tppitweaks.recipetweaks.modTweaks; +import codechicken.enderstorage.EnderStorage; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,15 +12,17 @@ public class EnderStorageTweaks extends TweakingRegistry { - @RecipeRemoval(requiredModids={"EnderStorage", "ThermalExpansion"}) + @RecipeRemoval(requiredModids = { "EnderStorage", "ThermalExpansion" }) public static void init() { - TweakingRegistry.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1, TweakingAction.CHANGED, "Recipe requires tesseract", "because it is better than one", "and requires midgame materials"); + TweakingRegistry.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1, TweakingAction.CHANGED, "Recipe requires tesseract", + "because it is better than one", "and requires midgame materials"); if (ConfigurationHandler.enderPouchNerf) - TweakingRegistry.markItemForRecipeRemoval(((Item) codechicken.enderstorage.EnderStorage.itemEnderPouch).itemID, -1, TweakingAction.CHANGED, "Recipe requires pyrotheum+ender bucket", "so it requires midgame infrastructure"); + TweakingRegistry.markItemForRecipeRemoval(((Item) codechicken.enderstorage.EnderStorage.itemEnderPouch).itemID, -1, TweakingAction.CHANGED, "Recipe requires pyrotheum+ender bucket", + "so it requires midgame infrastructure"); } - - @RecipeAddition(requiredModids={"EnderStorage", "ThermalExpansion"}) + + @RecipeAddition(requiredModids = { "EnderStorage", "ThermalExpansion" }) public static void addRecipes() { Object chestEnderElement = ConfigurationHandler.enderChestTesseract ? thermalexpansion.block.TEBlocks.blockTesseract : Item.enderPearl; @@ -27,24 +30,32 @@ public static void addRecipes() for (int i = 0; i < 16; i++) { - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), new Object[] { "bWb", "OCO", "bpb", 'b', Item.blazeRod, 'p', - chestEnderElement, 'O', Block.obsidian, 'C', Block.chest, 'W', new ItemStack(Block.cloth, 1, i) }); + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), new Object[] { + "bWb", "OCO", "bpb", 'b', Item.blazeRod, 'p', chestEnderElement, 'O', Block.obsidian, 'C', Block.chest, 'W', new ItemStack(Block.cloth, 1, i) }); + + if (!ConfigurationHandler.disableEnderTank) + { + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), + new Object[] { "bWb", "OCO", "bpb", 'b', Item.blazeRod, 'p', tankEnderElement, 'O', Block.obsidian, 'C', Item.cauldron, 'W', new ItemStack(Block.cloth, 1, i) }); + } + else + { + for (int j = 0; j < 16; j++) + { + for (int k = 0; k < 16; k++) + { + TweakingRegistry.addTweakedTooltip(((Block) EnderStorage.blockEnderChest).blockID, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, j, k), TweakingAction.REMOVED, "Has a serious dupe bug."); + } + } + } - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), new Object[] { "bWb", "OCO", "bpb", 'b', - Item.blazeRod, 'p', tankEnderElement, 'O', Block.obsidian, 'C', Item.cauldron, 'W', new ItemStack(Block.cloth, 1, i) }); - if (ConfigurationHandler.enderPouchNerf) { - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.itemEnderPouch, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), - "pWp", - "lel", - "plp", - - 'p', thermalexpansion.item.TEItems.dustPyrotheum, - 'l', Item.leather, - 'e', new ItemStack(thermalexpansion.fluid.TEFluids.itemBucket, 1, 2), - 'W', new ItemStack(Block.cloth, 1, i) - ); + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.itemEnderPouch, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), "pWp", + "lel", "plp", + + 'p', thermalexpansion.item.TEItems.dustPyrotheum, 'l', Item.leather, 'e', new ItemStack(thermalexpansion.fluid.TEFluids.itemBucket, 1, 2), 'W', + new ItemStack(Block.cloth, 1, i)); } } } From 6018876a7d5b0bb3cb92cc8b203abe8b08da5a73 Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Thu, 29 May 2014 15:31:13 -0400 Subject: [PATCH 05/30] 2nd part merge Fix ConfigurationHandler.java --- .../java/tppitweaks/config/ConfigurationHandler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 196a2ac..4a62c5f 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -34,12 +34,9 @@ public class ConfigurationHandler public static boolean enderChestResonant; public static boolean enderPouchNerf; -<<<<<<< HEAD - public static boolean enderTankTesseract; public static boolean disableEnderTank; -======= public static boolean enderTankResonant; ->>>>>>> origin/newEnderItems + public static boolean steelReactorCasings; public static boolean glassFuelRods; public static boolean twoReactorGlass; @@ -132,12 +129,8 @@ public static void init(File file) enderChestResonant = config.get("Ender Storage Tweaks", "enderChestResonant", true, "EnderStorage Ender Chests require resonant strongboxes instead of ender pearls.").getBoolean(true); enderPouchNerf = config.get("Ender Storage Tweaks", "enderPouchNerf", true, "EnderStorage Ender Pouches require pyrotheum dust and liquid ender instead of blaze rods and ender pearls.").getBoolean(true); -<<<<<<< HEAD - enderTankTesseract = config.get("Ender Storage Tweaks", "enderTankTesseract", true, "EnderStorage Ender Tanks require tesseracts instead of ender pearls.").getBoolean(true); disableEnderTank = config.get("Ender Storage Tweaks", "disableEnderTank", true, "Disables the ender tank. Setting this to false opens your game/server to dupes, be warned!").getBoolean(true); -======= enderTankResonant = config.get("Ender Storage Tweaks", "enderTankResonant", true, "EnderStorage Ender Tanks require resonant portable tanks instead of ender pearls.").getBoolean(true); ->>>>>>> origin/newEnderItems steelReactorCasings = config.get("Other Mod Tweaks", "steelReactorCasings", false, "Big Reactors reactor casings require steel. Affects ONLY the casings.").getBoolean(true); ic2TEGlassInterchangeability = config.get("Other Mod Tweaks", "ic2TEGlassInterchangeability", true, "IC2 reinforced glass (glassReinforced) and Thermal Expansion hardened glass (glassHardened)\nwill be cross-registered as each other in the ore dictionary.").getBoolean(false); From 35041f29bce9d6db3a22b5603185a0bcdbdfa119 Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Thu, 29 May 2014 15:33:04 -0400 Subject: [PATCH 06/30] Disable ReliquaryTweaks Handled by Xeno's Reliquary. --- .../recipetweaks/modTweaks/ReliquaryTweaks.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java index 33d5f65..2fb2736 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java @@ -14,14 +14,14 @@ public class ReliquaryTweaks @RecipeRemoval(requiredModids="xreliquary") public static void init() { - if (ConfigurationHandler.harderLillipadRecipe) - TweakingRegistry.markItemForRecipeRemoval(xreliquary.items.XRItems.condensedPotion.itemID, 10); +/* if (ConfigurationHandler.harderLillipadRecipe) +* TweakingRegistry.markItemForRecipeRemoval(xreliquary.items.XRItems.condensedPotion.itemID, 10); */ } @RecipeAddition(requiredModids="xreliquary") public static void addRecipes() { - if (ConfigurationHandler.harderLillipadRecipe) +/* if (ConfigurationHandler.harderLillipadRecipe) { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(xreliquary.items.XRItems.condensedPotion, 1, 10), "sap", @@ -32,6 +32,6 @@ public static void addRecipes() 'a', Item.appleGold, 'p', new ItemStack(Item.dyePowder, 1, 15) )); - } + } */ } } From 19628ca4ac3eb6132512d5e1e57449c58ccd958f Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Thu, 29 May 2014 15:38:43 -0400 Subject: [PATCH 07/30] Fix previous commit. --- .../tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index 579bff7..461aa1b 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -31,7 +31,7 @@ public static void addRecipes() { if (!ConfigurationHandler.disableEnderTank) { - TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, j, k), TweakingAction.CHANGED, "Recipe requires resonant tank", "because it is better than one", "and requires midgame materials"); + TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i), TweakingAction.CHANGED, "Recipe requires resonant tank", "because it is better than one", "and requires midgame materials"); GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), "bWb", From 2f69a88510096ffcd46a760d8c9f8e218fae9bf6 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 3 Jun 2014 21:17:41 -0400 Subject: [PATCH 08/30] It returns. --- .../java/tppitweaks/core/CoreMethods.java | 31 +++++++ .../java/tppitweaks/core/CoreTPPITweaks.java | 4 +- .../java/tppitweaks/core/CoreTransformer.java | 83 +++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 src/main/java/tppitweaks/core/CoreMethods.java create mode 100644 src/main/java/tppitweaks/core/CoreTransformer.java diff --git a/src/main/java/tppitweaks/core/CoreMethods.java b/src/main/java/tppitweaks/core/CoreMethods.java new file mode 100644 index 0000000..bdefe51 --- /dev/null +++ b/src/main/java/tppitweaks/core/CoreMethods.java @@ -0,0 +1,31 @@ +package tppitweaks.core; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntityFurnace; + +public class CoreMethods +{ + public static int getFuelBurnFurnace(ItemStack item) + { + return (int) (getFurnaceBurnTime(item) / 1.5); + } + + public static int getFuelBurnSurvivalist(ItemStack item) + { + return getFurnaceBurnTime(item) / 200; + } + + public static int getFurnaceBurnTime(ItemStack item) + { + if (item == null) + { + return 0; + } + if (item.itemID == Item.bucketLava.itemID) + { + return 0; + } + return TileEntityFurnace.getItemBurnTime(item); + } +} diff --git a/src/main/java/tppitweaks/core/CoreTPPITweaks.java b/src/main/java/tppitweaks/core/CoreTPPITweaks.java index 04fc45b..a3090f1 100644 --- a/src/main/java/tppitweaks/core/CoreTPPITweaks.java +++ b/src/main/java/tppitweaks/core/CoreTPPITweaks.java @@ -12,7 +12,7 @@ public class CoreTPPITweaks implements IFMLLoadingPlugin @Override public String[] getASMTransformerClass() { - return null; + return new String[]{"tppitweaks.core.CoreTransformer"}; } @Override @@ -30,7 +30,7 @@ public String getSetupClass() @Override public void injectData(Map data) { - System.out.println("TPPITweaks coremod, we knew ye well, you have served your purpose. We need you no more."); + System.out.println("TPPITweaks coremod, rise from your grave, we require you once more."); File mcDir = (File) data.get("mcLocation"); File modsDir = null; diff --git a/src/main/java/tppitweaks/core/CoreTransformer.java b/src/main/java/tppitweaks/core/CoreTransformer.java new file mode 100644 index 0000000..a10b77a --- /dev/null +++ b/src/main/java/tppitweaks/core/CoreTransformer.java @@ -0,0 +1,83 @@ +package tppitweaks.core; + +import java.util.Iterator; + +import net.minecraft.launchwrapper.IClassTransformer; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.tree.AbstractInsnNode; +import org.objectweb.asm.tree.ClassNode; +import org.objectweb.asm.tree.InsnList; +import org.objectweb.asm.tree.LabelNode; +import org.objectweb.asm.tree.MethodInsnNode; +import org.objectweb.asm.tree.MethodNode; +import org.objectweb.asm.tree.VarInsnNode; + +public class CoreTransformer implements IClassTransformer +{ + private final String FURNACE_GEN_CLASS = "extrautils.tileentity.generator.TileEntityGeneratorFurnace"; + private final String SURVIVALIST_GEN_CLASS = "extrautils.tileentity.generator.TileEntityGeneratorFurnaceSurvival"; + + private final String FURNACE_GEN_METHOD = "getFuelBurn"; + private final String FURNACE_GEN_METHOD_DESC = "(Lnet/minecraft/item/ItemStack;)I"; + + private final String NEW_FURNACE_GEN_METHOD = "getFuelBurnFurnace"; + private final String NEW_SURVIVALIST_GEN_METHOD = "getFuelBurnSurvivalist"; + + @Override + public byte[] transform(String name, String transformedName, byte[] basicClass) + { + if (name.compareTo(FURNACE_GEN_CLASS) == 0) + return transformFurnaceClass(basicClass, NEW_FURNACE_GEN_METHOD); + else if (name.compareTo(SURVIVALIST_GEN_CLASS) == 0) + return transformFurnaceClass(basicClass, NEW_SURVIVALIST_GEN_METHOD); + return basicClass; + } + + private byte[] transformFurnaceClass(byte[] basicClass, String newMethod) + { + System.out.println("TPPITweaks transforming ExU Generator to method " + newMethod); + ClassNode classNode = new ClassNode(); + ClassReader classReader = new ClassReader(basicClass); + classReader.accept(classNode, 0); + + Iterator methods = classNode.methods.iterator(); + while (methods.hasNext()) + { + MethodNode m = methods.next(); + if (m.name.equals(FURNACE_GEN_METHOD)) + { + for (int index = 0; index < m.instructions.size(); index++) + { + if (m.instructions.get(index).getType() == AbstractInsnNode.METHOD_INSN) + { + LabelNode lmm1Node = new LabelNode(new Label()); + + LabelNode jumpLabel = new LabelNode(new Label()); + + InsnList toInject = new InsnList(); + + toInject.add(new VarInsnNode(Opcodes.ALOAD, 1)); + + toInject.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "tppitweaks/core/CoreMethods", newMethod, FURNACE_GEN_METHOD_DESC)); + + toInject.add(jumpLabel); + toInject.add(lmm1Node); + + m.instructions.insert(m.instructions.get(index), toInject); + + break; + } + } + } + } + + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); + classNode.accept(cw); + + return cw.toByteArray(); + } +} From 00b765179f9579d93e06828c9675fce19479839a Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 8 Jun 2014 19:28:59 -0400 Subject: [PATCH 09/30] Switch to using RecipeTweakingCore for everything. --- src/main/java/tppitweaks/TPPITweaks.java | 21 +-- .../tppitweaks/event/TPPIEventHandler.java | 30 ---- src/main/java/tppitweaks/lib/Reference.java | 3 +- .../recipetweaks/AdditionalTweaks.java | 65 +++++++ .../recipetweaks/RecipeAddition.java | 26 --- .../recipetweaks/RecipeRemoval.java | 19 -- .../tppitweaks/recipetweaks/RecipeTweaks.java | 168 ------------------ .../recipetweaks/TweakingRegistry.java | 126 ------------- .../recipetweaks/modTweaks/AM2Tweaks.java | 6 +- .../modTweaks/AdvancedGeneticsTweaks.java | 6 +- .../modTweaks/BigReactorsTweaks.java | 8 +- .../recipetweaks/modTweaks/DATweaks.java | 6 +- .../recipetweaks/modTweaks/DCTweaks.java | 6 +- .../recipetweaks/modTweaks/EnderIOTweaks.java | 8 +- .../modTweaks/EnderStorageTweaks.java | 8 +- .../recipetweaks/modTweaks/ExUTweaks.java | 10 +- .../modTweaks/GregtechTweaks.java | 10 +- .../recipetweaks/modTweaks/IC2Tweaks.java | 10 +- .../recipetweaks/modTweaks/JABBATweaks.java | 8 +- .../recipetweaks/modTweaks/MFRTweaks.java | 8 +- .../recipetweaks/modTweaks/MPSATweaks.java | 6 +- .../modTweaks/MagicropsAndIC2Tweaks.java | 6 +- .../modTweaks/MagicropsAndTETweaks.java | 6 +- .../modTweaks/MagicropsTweaks.java | 8 +- .../modTweaks/MekanismTweaks.java | 8 +- .../modTweaks/OpenBlocksTweaks.java | 8 +- .../recipetweaks/modTweaks/PRTweaks.java | 2 +- .../modTweaks/RailcraftTweaks.java | 8 +- .../modTweaks/ReliquaryTweaks.java | 10 +- .../recipetweaks/modTweaks/SFMTweaks.java | 8 +- .../recipetweaks/modTweaks/TETweaks.java | 8 +- 31 files changed, 156 insertions(+), 474 deletions(-) create mode 100644 src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java delete mode 100644 src/main/java/tppitweaks/recipetweaks/RecipeAddition.java delete mode 100644 src/main/java/tppitweaks/recipetweaks/RecipeRemoval.java delete mode 100644 src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java delete mode 100644 src/main/java/tppitweaks/recipetweaks/TweakingRegistry.java diff --git a/src/main/java/tppitweaks/TPPITweaks.java b/src/main/java/tppitweaks/TPPITweaks.java index 765cac9..bfd0e7b 100644 --- a/src/main/java/tppitweaks/TPPITweaks.java +++ b/src/main/java/tppitweaks/TPPITweaks.java @@ -17,10 +17,10 @@ import tppitweaks.lib.Reference; import tppitweaks.proxy.CommonProxy; import tppitweaks.proxy.PacketHandler; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.RecipeTweaks; +import tppitweaks.recipetweaks.AdditionalTweaks; import tppitweaks.util.FileLoader; import tppitweaks.util.TPPIPlayerTracker; +import tterrag.rtc.RecipeTweakingCore; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -56,6 +56,8 @@ public class TPPITweaks public void preInit(FMLPreInitializationEvent event) { logger.setParent(FMLCommonHandler.instance().getFMLLogger()); + + RecipeTweakingCore.registerPackageName("tppitweaks.recipetweaks.modTweaks"); ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/TPPI/TPPITweaks.cfg")); @@ -93,8 +95,6 @@ public void init(FMLInitializationEvent event) if (event.getSide().isClient()) proxy.initTickHandler(); - - tweakAtEvent(EventTime.INIT); } @EventHandler @@ -112,7 +112,8 @@ public void postInit(FMLPostInitializationEvent event) } } - tweakAtEvent(EventTime.POST_INIT); + AdditionalTweaks.doOreDictTweaks(); + AdditionalTweaks.addMiscRecipes(); } @EventHandler @@ -120,14 +121,4 @@ public void onFMLServerStart(FMLServerStartingEvent event) { event.registerServerCommand(new CommandTPPI()); } - - public static void tweakAtEvent(EventTime event) - { - if (event == EventTime.POST_INIT) - RecipeTweaks.removeRecipes(); - - RecipeTweaks.addRecipes(event); - - RecipeTweaks.doRemainingTweaks(event); - } } diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index 1f624f1..ec2e90a 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -8,15 +8,10 @@ import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; 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 org.lwjgl.input.Keyboard; - import tppitweaks.TPPITweaks; import tppitweaks.client.gui.GuiHelper; import tppitweaks.client.gui.IRCGui; @@ -24,9 +19,6 @@ import tppitweaks.client.gui.UpdateGui; import tppitweaks.config.ConfigurationHandler; import tppitweaks.lib.Reference; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.RecipeTweaks; -import tppitweaks.recipetweaks.TweakingRegistry; import tppitweaks.recipetweaks.modTweaks.DATweaks; import com.google.common.collect.ImmutableList; @@ -193,27 +185,5 @@ public void onItemTooltip(ItemTooltipEvent event) { DATweaks.addTooltip(event); } - - String[] lines = TweakingRegistry.getTooltip(event.itemStack.itemID, event.itemStack.getItemDamage()); - if (lines != null) - { - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) - { - event.toolTip.add(EnumChatFormatting.RED + "Tweaked Item:"); - for (int i = 0; i < lines.length; i++) - event.toolTip.add((i == 0 ? EnumChatFormatting.AQUA : EnumChatFormatting.YELLOW)+ lines[i]); - } - else - event.toolTip.add(EnumChatFormatting.YELLOW + "Tweaked Item! - " + EnumChatFormatting.RED + "Shift " + EnumChatFormatting.YELLOW + "for Info"); - } - } - - @ForgeSubscribe - public void onPlayerJoin(EntityJoinWorldEvent event) { - if (!RecipeTweaks.recipesInitialized) - { - TPPITweaks.tweakAtEvent(EventTime.PLAYER_JOIN); - RecipeTweaks.recipesInitialized = true; - } } } \ No newline at end of file diff --git a/src/main/java/tppitweaks/lib/Reference.java b/src/main/java/tppitweaks/lib/Reference.java index 1fb92a1..416dd59 100644 --- a/src/main/java/tppitweaks/lib/Reference.java +++ b/src/main/java/tppitweaks/lib/Reference.java @@ -44,7 +44,8 @@ public class Reference + "after:MineFactoryReloaded;" + "after:JABBA;" + "after:EnderIO;" - + "after:ProjRed|Core"; + + "after:ProjRed|Core;" + + "required-after:recipeTweakingCore"; public static String packName = "Test Pack Please Ignore"; public static String packVersion = "0.2.2"; diff --git a/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java b/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java new file mode 100644 index 0000000..7470277 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java @@ -0,0 +1,65 @@ +package tppitweaks.recipetweaks; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapelessOreRecipe; +import tppitweaks.TPPITweaks; +import cpw.mods.fml.common.registry.GameRegistry; + +public class AdditionalTweaks +{ + public static boolean recipesInitialized; + + @SuppressWarnings("unchecked") + public static void doOreDictTweaks() + { + // cross registering alumin(um/ium) + for (ItemStack s : OreDictionary.getOres("dustAluminium")) + { + OreDictionary.registerOre("dustAluminum", s); + } + + // fixing zinc smelting + List dirtyZincs = OreDictionary.getOres("dustImpureZinc"); + for (ItemStack stack : dirtyZincs) + { + ItemStack newStack = stack.copy(); + for (ItemStack stack1 : OreDictionary.getOres("ingotZinc")) + FurnaceRecipes.smelting().addSmelting(newStack.itemID, newStack.getItemDamage(), stack1.copy(), 0.1F); + } + + // fixing fused quartz + try + { + int id = OreDictionary.getOreID("glassHardened"); + Field f = OreDictionary.class.getDeclaredField("oreStacks"); + f.setAccessible(true); + HashMap> temp = (HashMap>) f.get(null); + ArrayList glasses = (ArrayList) temp.get(id).clone(); + for (int i = 0; i < glasses.size(); i++) + if (glasses.get(i).getUnlocalizedName().toLowerCase().contains("fused")) + glasses.remove(i); + temp.remove(id); + temp.put(id, glasses); + f.set(null, temp); + } + catch (Throwable t) + { + TPPITweaks.logger.severe("Fixing EnderIO via reflection failed!"); + t.printStackTrace(); + } + } + + public static void addMiscRecipes() + { + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "nuggetSteel", Item.flint)); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "ingotIron", Item.flint)); + } +} diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java b/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java deleted file mode 100644 index 7d5b58e..0000000 --- a/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java +++ /dev/null @@ -1,26 +0,0 @@ -package tppitweaks.recipetweaks; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Marks a method as one that removes a recipe - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -public @interface RecipeAddition -{ - public enum EventTime { INIT, POST_INIT, PLAYER_JOIN } - - /** - * The event at which this method is to be executed - */ - EventTime time() default EventTime.POST_INIT; - - /** - * The modids that must be loaded for this method to execute - */ - String[] requiredModids() default {}; -} diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeRemoval.java b/src/main/java/tppitweaks/recipetweaks/RecipeRemoval.java deleted file mode 100644 index db30366..0000000 --- a/src/main/java/tppitweaks/recipetweaks/RecipeRemoval.java +++ /dev/null @@ -1,19 +0,0 @@ -package tppitweaks.recipetweaks; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Marks a method as one that removes recipes - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -public @interface RecipeRemoval -{ - /** - * The modids that must be loaded for this method to execute - */ - String[] requiredModids() default {}; -} diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java deleted file mode 100644 index 3a92dc7..0000000 --- a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java +++ /dev/null @@ -1,168 +0,0 @@ -package tppitweaks.recipetweaks; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Set; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapelessOreRecipe; -import tppitweaks.TPPITweaks; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; - -import com.google.common.reflect.ClassPath; -import com.google.common.reflect.ClassPath.ClassInfo; - -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; - -public class RecipeTweaks -{ - public static boolean recipesInitialized; - - @SuppressWarnings("unchecked") - private static void doOreDictTweaks() - { - // cross registering alumin(um/ium) - for (ItemStack s : OreDictionary.getOres("dustAluminium")) - { - OreDictionary.registerOre("dustAluminum", s); - } - - // fixing zinc smelting - List dirtyZincs = OreDictionary.getOres("dustImpureZinc"); - for (ItemStack stack : dirtyZincs) - { - ItemStack newStack = stack.copy(); - for (ItemStack stack1 : OreDictionary.getOres("ingotZinc")) - FurnaceRecipes.smelting().addSmelting(newStack.itemID, newStack.getItemDamage(), stack1.copy(), 0.1F); - } - - // fixing fused quartz - try - { - int id = OreDictionary.getOreID("glassHardened"); - Field f = OreDictionary.class.getDeclaredField("oreStacks"); - f.setAccessible(true); - HashMap> temp = (HashMap>) f.get(null); - ArrayList glasses = (ArrayList) temp.get(id).clone(); - for (int i = 0; i < glasses.size(); i++) - if (glasses.get(i).getUnlocalizedName().toLowerCase().contains("fused")) - glasses.remove(i); - temp.remove(id); - temp.put(id, glasses); - f.set(null, temp); - } - catch (Throwable t) - { - TPPITweaks.logger.severe("Fixing EnderIO via reflection failed!"); - t.printStackTrace(); - } - } - - private static void addMiscRecipes() - { - GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "nuggetSteel", Item.flint)); - GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, "ingotIron", Item.flint)); - } - - public static void removeRecipes() - { - try - { - ClassPath classpath = ClassPath.from(RecipeTweaks.class.getClassLoader()); - Set classes = classpath.getTopLevelClasses("tppitweaks.recipetweaks.modTweaks"); - - for (ClassInfo c : classes) - { - for (Method m : loadClassSafe(c)) - { - RecipeRemoval r = m.getAnnotation(RecipeRemoval.class); - if (r != null && allModsLoaded(r.requiredModids())) - { - TPPITweaks.logger.info("Removing recipes in method " + m.getName() + " in class " + c.getName()); - m.invoke(null, new Object[]{}); - } - } - } - } - catch (Throwable t) - { - TPPITweaks.logger.severe("Could not perform recipe removals. This is a serious error!"); - throw new RuntimeException(t); - } - - TweakingRegistry.removeRecipes(); - } - - public static void addRecipes(EventTime time) - { - try - { - ClassPath classpath = ClassPath.from(RecipeTweaks.class.getClassLoader()); - Set classes = classpath.getTopLevelClasses("tppitweaks.recipetweaks.modTweaks"); - - for (ClassInfo c : classes) - { - for (Method m : loadClassSafe(c)) - { - RecipeAddition r = m.getAnnotation(RecipeAddition.class); - if (r != null && allModsLoaded(r.requiredModids()) && r.time() == time) - { - TPPITweaks.logger.info("Adding recipes in method " + m.getName() + " in class " + c.getName()); - m.invoke(null, new Object[]{}); - } - } - } - } - catch (Throwable t) - { - TPPITweaks.logger.severe("Could not perform recipe additions. This is a serious error!"); - throw new RuntimeException(t); - } - } - - private static Method[] loadClassSafe(ClassInfo c) - { - try - { - Class clazz = c.load(); - return clazz.getDeclaredMethods(); - } - catch (Throwable t) - { - TPPITweaks.logger.info(String.format("Class %s threw an error, skipping...", c.getName())); - return new Method[]{}; - } - } - - public static void doRemainingTweaks(EventTime time) - { - switch(time) - { - case INIT: - addMiscRecipes(); - break; - case POST_INIT: - doOreDictTweaks(); - break; - default: - break; - } - } - - private static boolean allModsLoaded(String[] modids) - { - for (String s : modids) - { - if (!Loader.isModLoaded(s)) - return false; - } - return true; - } -} diff --git a/src/main/java/tppitweaks/recipetweaks/TweakingRegistry.java b/src/main/java/tppitweaks/recipetweaks/TweakingRegistry.java deleted file mode 100644 index dd0bbf9..0000000 --- a/src/main/java/tppitweaks/recipetweaks/TweakingRegistry.java +++ /dev/null @@ -1,126 +0,0 @@ -package tppitweaks.recipetweaks; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.ListIterator; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; - -public class TweakingRegistry -{ - private static HashMap> recipesToRemove = new HashMap>(); - private static HashMap> removalReasons = new HashMap>(); - - public enum TweakingAction - { - REMOVED("Removed:"), - CHANGED("Recipe Changed:"), - ADDED("Added:"), - NOTE("Note: "); - - private String name; - - TweakingAction(String name) - { - this.name = name; - } - - @Override - public String toString() - { - return name; - } - } - - public static void markItemForRecipeRemoval(int id, int damage) { - if(!recipesToRemove.containsKey(id)) { - recipesToRemove.put(id, new HashSet()); - } - recipesToRemove.get(id).add(damage); - } - - public static void markItemForRecipeRemoval(int id, int damage, TweakingAction action, String... details) { - markItemForRecipeRemoval(id, damage); - addTweakedTooltip(id, damage, action, details); - } - - public static void addTweakedTooltip(int id, int damage, TweakingAction action, String... details) - { - if (!removalReasons.containsKey(id)) - { - removalReasons.put(id, new HashMap()); - } - - String[] lines = new String[details.length + 1]; - lines[0] = action.toString(); - - for (int i = 1; i < lines.length; i++) - lines[i] = details[i - 1]; - - removalReasons.get(id).put(damage, lines); - } - - public static HashSet getDamageValuesToRemove(int itemID) { - return recipesToRemove.get(itemID); - } - - @SuppressWarnings({ "unchecked" }) - static void removeRecipes() - { - ListIterator iterator = CraftingManager.getInstance().getRecipeList().listIterator(); - while (iterator.hasNext()) - { - IRecipe r = iterator.next(); - if (canRemoveRecipe(r)) - { - iterator.remove(); - } - } - } - - private static boolean canRemoveRecipe(IRecipe r) - { - try - { - ItemStack output = r.getRecipeOutput(); - HashSet validMetas = getDamageValuesToRemove(output.itemID); - return validMetas.contains(-1) || validMetas.contains(output.getItemDamage()); - } - catch (Throwable e) - { - return false; - } - } - - /** - * Whether or not this ID (and damage value) has been removed - * @param data
- [0] - ID - *
- [1] - damage (can be ommitted)

- * No further data will be analyzed - */ - public static boolean contains(int id, int damage) - { - return removalReasons.get(id) != null && removalReasons.get(id).containsKey(damage); - } - - /** - * The tooltip associated with this ID/damage - * @param id - * @param damage - no sensitivity = -1 - * @return null if no tooltip associated - */ - public static String[] getTooltip(int id, int damage) - { - if (contains(id, damage)) - { - return removalReasons.get(id).get(damage); - } - else if (contains(id, -1)) - { - return removalReasons.get(id).get(-1); - } - return null; - } -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java index 0794427..c560a0f 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java @@ -2,9 +2,9 @@ import net.minecraft.item.ItemStack; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class AM2Tweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java index 7c84bc4..d720014 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java @@ -2,9 +2,9 @@ import net.minecraft.block.Block; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import com.advGenetics.AdvGenetics; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java index 5a42edb..76758fd 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java @@ -5,10 +5,10 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class BigReactorsTweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java index e45ef44..f468c5f 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java @@ -5,9 +5,9 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; import cpw.mods.fml.common.registry.GameRegistry; public class DATweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java index 9ee4900..10147bb 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java @@ -2,9 +2,9 @@ import net.minecraft.item.Item; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import bluedart.item.DartItem; public class DCTweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java index 9825487..2174204 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java @@ -4,10 +4,10 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; import crazypants.enderio.Config; import crazypants.enderio.EnderIO; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index 461aa1b..efe68e1 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -1,13 +1,13 @@ package tppitweaks.recipetweaks.modTweaks; -import codechicken.enderstorage.EnderStorage; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import codechicken.enderstorage.EnderStorage; import cpw.mods.fml.common.registry.GameRegistry; public class EnderStorageTweaks extends TweakingRegistry diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java index f924af0..4d128ad 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java @@ -13,11 +13,11 @@ import tppitweaks.block.ModBlocks; import tppitweaks.config.ConfigurationHandler; import tppitweaks.item.ModItems; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import extrautils.ExtraUtils; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index c3be29e..e08f827 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -8,11 +8,11 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapelessOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java index a2f7ba2..3151f88 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java @@ -9,11 +9,11 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java index 5ab075e..5af1486 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java @@ -6,10 +6,10 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import powercrystals.minefactoryreloaded.setup.Machine; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; import factorization.shared.Core; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java index 0be2489..cffe90f 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java @@ -6,10 +6,10 @@ import powercrystals.minefactoryreloaded.MineFactoryReloadedCore; import powercrystals.minefactoryreloaded.setup.Machine; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class MFRTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java index ee79416..1b55a7b 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java @@ -3,9 +3,9 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; import cpw.mods.fml.common.registry.GameRegistry; public class MPSATweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java index 58604e0..808db27 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java @@ -1,9 +1,9 @@ package tppitweaks.recipetweaks.modTweaks; import net.minecraft.item.ItemStack; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; public class MagicropsAndIC2Tweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java index f0707f3..aafa2d5 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java @@ -2,9 +2,9 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; public class MagicropsAndTETweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java index 1cc7d75..603d364 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java @@ -5,10 +5,10 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; import cpw.mods.fml.common.registry.GameRegistry; public class MagicropsTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index aaf80dc..5ef1000 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -8,10 +8,10 @@ import net.minecraftforge.oredict.OreDictionary; import tppitweaks.config.ConfigurationHandler; import tppitweaks.item.ModItems; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class MekanismTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java index 3d0880e..a2bafd4 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java @@ -5,10 +5,10 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class OpenBlocksTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/PRTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/PRTweaks.java index ffe37dc..43c64f5 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/PRTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/PRTweaks.java @@ -2,7 +2,7 @@ import mrtjp.projectred.exploration.BlockSpecialStone; import net.minecraftforge.oredict.OreDictionary; -import tppitweaks.recipetweaks.RecipeAddition; +import tterrag.rtc.RecipeAddition; public class PRTweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java index 4362c1c..04dbdcb 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java @@ -4,10 +4,10 @@ import mods.railcraft.common.items.ItemPlate.EnumPlate; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapelessOreRecipe; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeAddition.EventTime; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; -import tppitweaks.recipetweaks.TweakingRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class RailcraftTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java index 2fb2736..f63fe97 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java @@ -1,13 +1,7 @@ package tppitweaks.recipetweaks.modTweaks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.ShapedOreRecipe; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import cpw.mods.fml.common.registry.GameRegistry; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; public class ReliquaryTweaks { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java index ff1cd74..ae01279 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java @@ -6,10 +6,10 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; import tppitweaks.config.ConfigurationHandler; import tppitweaks.item.ModItems; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class SFMTweaks diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java index 4f33b3e..1fe95c5 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java @@ -8,10 +8,10 @@ import thermalexpansion.util.crafting.FurnaceManager; import tppitweaks.TPPITweaks; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.RecipeAddition; -import tppitweaks.recipetweaks.RecipeRemoval; -import tppitweaks.recipetweaks.TweakingRegistry; -import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import tterrag.rtc.RecipeAddition; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class TETweaks { From 7af8cd1848b83131c8ef0cfad477c4d15ad6c0f6 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 8 Jun 2014 19:34:48 -0400 Subject: [PATCH 10/30] Add RTC as submodule --- .gitmodules | 3 +++ master | 1 + 2 files changed, 4 insertions(+) create mode 160000 master diff --git a/.gitmodules b/.gitmodules index 4617299..4485d46 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "library"] path = library url = git://github.com/ShadedDimension/library.git +[submodule "master"] + path = master + url = git://github.com/TPPI-Dev/RecipeTweakingCore.git diff --git a/master b/master new file mode 160000 index 0000000..c7ec1a8 --- /dev/null +++ b/master @@ -0,0 +1 @@ +Subproject commit c7ec1a89f2fb1a2967eee86a3dad0b7eecdafe16 From bc948340e3a64b953f9fb26ef55fe8d7e976ee61 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 8 Jun 2014 19:39:27 -0400 Subject: [PATCH 11/30] Hopefully fix build issues --- .gitmodules | 7 ++----- master => RecipeTweakingCore | 0 2 files changed, 2 insertions(+), 5 deletions(-) rename master => RecipeTweakingCore (100%) diff --git a/.gitmodules b/.gitmodules index 4485d46..87f228a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "library"] - path = library - url = git://github.com/ShadedDimension/library.git -[submodule "master"] - path = master +[submodule "RecipeTweakingCore"] + path = RecipeTweakingCore url = git://github.com/TPPI-Dev/RecipeTweakingCore.git diff --git a/master b/RecipeTweakingCore similarity index 100% rename from master rename to RecipeTweakingCore From b0db1caaf4d4f1d8dc713fdfc90709968973680b Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 8 Jun 2014 20:36:52 -0400 Subject: [PATCH 12/30] No longer get second book when leaving the end --- .../java/tppitweaks/event/TPPIEventHandler.java | 13 ++++++++----- .../java/tppitweaks/util/TPPIPlayerTracker.java | 5 ++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index ec2e90a..a6efd22 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -160,16 +160,19 @@ else if (s.contains("Forge") && !s.contains(":")) @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"); + savePlayerNBT((EntityPlayer) event.entityLiving); } } + private void savePlayerNBT(EntityPlayer player) + { + TPPITweaks.logger.log(Level.INFO, "getting NBT"); + + NBTValOnDeath = player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook"); + } + public NBTTagCompound getTag(EntityPlayer entity, boolean useClassVal) { NBTTagCompound tag = new NBTTagCompound(); diff --git a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java b/src/main/java/tppitweaks/util/TPPIPlayerTracker.java index f765625..412a9ee 100644 --- a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java +++ b/src/main/java/tppitweaks/util/TPPIPlayerTracker.java @@ -8,7 +8,6 @@ import tppitweaks.config.ConfigurationHandler; import tppitweaks.event.TPPIEventHandler; import tppitweaks.item.ModItems; -import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.IPlayerTracker; public class TPPIPlayerTracker implements IPlayerTracker @@ -29,7 +28,7 @@ public void onPlayerLogout(EntityPlayer player) @Override public void onPlayerChangedDimension(EntityPlayer player) { - // Do Nothing + TPPIEventHandler.NBTValOnDeath = player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook"); } @Override @@ -43,7 +42,7 @@ public void onPlayerRespawn(EntityPlayer player) private boolean addBook(EntityPlayer player) { - if (player != null && ConfigurationHandler.doSpawnBook && !player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook") && FMLCommonHandler.instance().getEffectiveSide().isServer()) + if (player != null && ConfigurationHandler.doSpawnBook && !player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook") && !player.worldObj.isRemote) { TPPITweaks.logger.log(Level.INFO, "Adding book"); From 7099cc2eb0fe45f416bfb11ebd1259363b0d04f7 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Mon, 9 Jun 2014 00:27:34 -0400 Subject: [PATCH 13/30] Remove (hopefully) all features that are now in ModpackTweaks --- .gitmodules | 3 - RecipeTweakingCore | 1 - src/main/java/tppitweaks/TPPITweaks.java | 42 +- .../java/tppitweaks/client/gui/ConfigGui.java | 50 ++- .../java/tppitweaks/client/gui/GuiHelper.java | 35 -- .../client/gui/InstructionsGui.java | 149 ------- .../tppitweaks/client/gui/MaricultureGui.java | 6 +- .../tppitweaks/client/gui/ModDownload.java | 14 - .../tppitweaks/client/gui/RestartGui.java | 44 --- .../java/tppitweaks/client/gui/UpdateGui.java | 153 -------- .../gui/library/container/ContainerBase.java | 207 ---------- .../client/gui/library/gui/GuiBase.java | 362 ------------------ .../gui/library/gui/GuiBaseContainer.java | 311 --------------- .../client/gui/library/gui/IGuiBase.java | 56 --- .../client/gui/library/gui/Parser.java | 79 ---- .../library/gui/button/GuiBetterSlider.java | 100 ----- .../gui/library/gui/button/GuiRGBSlider.java | 75 ---- .../gui/library/gui/button/GuideButton.java | 95 ----- .../gui/library/gui/element/ElementBase.java | 174 --------- .../gui/element/ElementBaseContainer.java | 103 ----- .../library/gui/element/ElementBubbles.java | 59 --- .../library/gui/element/ElementButton.java | 87 ----- .../gui/element/ElementButtonIcon.java | 38 -- .../library/gui/element/ElementCrafting.java | 136 ------- .../library/gui/element/ElementDownArrow.java | 59 --- .../gui/element/ElementFakeItemSlot.java | 63 --- .../gui/library/gui/element/ElementFire.java | 62 --- .../library/gui/element/ElementFluidTank.java | 95 ----- .../gui/library/gui/element/ElementIcon.java | 58 --- .../library/gui/element/ElementItemIcon.java | 58 --- .../gui/element/ElementItemIconWithCount.java | 19 - .../gui/element/ElementItemIconWithSlot.java | 34 -- .../ElementItemIconWithSlotAndCount.java | 35 -- .../gui/element/ElementItemStackPanel.java | 59 --- .../library/gui/element/ElementItemText.java | 52 --- .../gui/library/gui/element/ElementPlus.java | 76 ---- .../gui/element/ElementProgressBar.java | 115 ------ .../gui/element/ElementRedstoneFlux.java | 50 --- .../gui/element/ElementRightArrow.java | 61 --- .../library/gui/element/ElementScrollBar.java | 109 ------ .../gui/element/ElementScrollPanel.java | 199 ---------- .../element/ElementScrollPanelOverlay.java | 60 --- .../gui/library/gui/element/ElementText.java | 48 --- .../library/gui/element/ElementTextBox.java | 45 --- .../gui/element/ElementTextClickable.java | 33 -- .../gui/utils/ComparableItemStack.java | 161 -------- .../gui/library/gui/utils/GuiUtils.java | 203 ---------- .../gui/library/gui/utils/ItemHelper.java | 43 --- .../gui/utils/ThermalExpansionHelper.java | 234 ----------- .../client/gui/modGuides/GuiGuideBase.java | 273 ------------- .../client/gui/modGuides/GuiMod.java | 23 -- .../java/tppitweaks/command/CommandTPPI.java | 194 +--------- .../config/ConfigurationHandler.java | 59 +-- .../creativeTab/CreativeTabTPPI.java | 6 +- .../tppitweaks/event/TPPIEventHandler.java | 150 +------- src/main/java/tppitweaks/item/ModItems.java | 17 +- src/main/java/tppitweaks/item/TPPIBook.java | 167 -------- src/main/java/tppitweaks/lib/Reference.java | 7 - .../java/tppitweaks/proxy/PacketHandler.java | 21 - src/main/java/tppitweaks/util/FileLoader.java | 248 ------------ .../tppitweaks/util/TPPIPlayerTracker.java | 59 --- .../java/tppitweaks/util/TPPITweaksUtils.java | 68 ++++ src/main/java/tppitweaks/util/TxtParser.java | 33 +- 63 files changed, 113 insertions(+), 5622 deletions(-) delete mode 100644 .gitmodules delete mode 160000 RecipeTweakingCore delete mode 100644 src/main/java/tppitweaks/client/gui/GuiHelper.java delete mode 100644 src/main/java/tppitweaks/client/gui/InstructionsGui.java delete mode 100644 src/main/java/tppitweaks/client/gui/ModDownload.java delete mode 100644 src/main/java/tppitweaks/client/gui/RestartGui.java delete mode 100644 src/main/java/tppitweaks/client/gui/UpdateGui.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/container/ContainerBase.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/GuiBase.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/GuiBaseContainer.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/IGuiBase.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/Parser.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/button/GuiBetterSlider.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/button/GuiRGBSlider.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/button/GuideButton.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementBase.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementBaseContainer.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementBubbles.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementButton.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementButtonIcon.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementCrafting.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementDownArrow.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementFakeItemSlot.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementFire.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementFluidTank.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementIcon.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIcon.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithCount.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlot.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlotAndCount.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemStackPanel.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemText.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementPlus.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementProgressBar.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementRedstoneFlux.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementRightArrow.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollBar.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanel.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanelOverlay.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementText.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextBox.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextClickable.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/utils/ComparableItemStack.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/utils/GuiUtils.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/utils/ItemHelper.java delete mode 100644 src/main/java/tppitweaks/client/gui/library/gui/utils/ThermalExpansionHelper.java delete mode 100644 src/main/java/tppitweaks/client/gui/modGuides/GuiGuideBase.java delete mode 100644 src/main/java/tppitweaks/client/gui/modGuides/GuiMod.java delete mode 100644 src/main/java/tppitweaks/item/TPPIBook.java delete mode 100644 src/main/java/tppitweaks/proxy/PacketHandler.java delete mode 100644 src/main/java/tppitweaks/util/FileLoader.java delete mode 100644 src/main/java/tppitweaks/util/TPPIPlayerTracker.java diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 87f228a..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "RecipeTweakingCore"] - path = RecipeTweakingCore - url = git://github.com/TPPI-Dev/RecipeTweakingCore.git diff --git a/RecipeTweakingCore b/RecipeTweakingCore deleted file mode 160000 index c7ec1a8..0000000 --- a/RecipeTweakingCore +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c7ec1a89f2fb1a2967eee86a3dad0b7eecdafe16 diff --git a/src/main/java/tppitweaks/TPPITweaks.java b/src/main/java/tppitweaks/TPPITweaks.java index bfd0e7b..11ca898 100644 --- a/src/main/java/tppitweaks/TPPITweaks.java +++ b/src/main/java/tppitweaks/TPPITweaks.java @@ -1,14 +1,11 @@ package tppitweaks; import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.util.logging.Logger; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.MinecraftForge; import tppitweaks.block.ModBlocks; -import tppitweaks.client.gui.GuiHelper; import tppitweaks.command.CommandTPPI; import tppitweaks.config.ConfigurationHandler; import tppitweaks.creativeTab.CreativeTabTPPI; @@ -16,10 +13,7 @@ import tppitweaks.item.ModItems; import tppitweaks.lib.Reference; import tppitweaks.proxy.CommonProxy; -import tppitweaks.proxy.PacketHandler; import tppitweaks.recipetweaks.AdditionalTweaks; -import tppitweaks.util.FileLoader; -import tppitweaks.util.TPPIPlayerTracker; import tterrag.rtc.RecipeTweakingCore; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; @@ -30,11 +24,8 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.network.NetworkMod; -import cpw.mods.fml.common.registry.GameRegistry; @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 = "1.1.0"; @@ -46,7 +37,6 @@ public class TPPITweaks public static CommonProxy proxy; public static TPPIEventHandler eventHandler; - public static TPPIPlayerTracker playerTracker; public static final Logger logger = Logger.getLogger("TPPITweaks"); @@ -60,27 +50,11 @@ public void preInit(FMLPreInitializationEvent event) RecipeTweakingCore.registerPackageName("tppitweaks.recipetweaks.modTweaks"); ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/TPPI/TPPITweaks.cfg")); - - try - { - FileLoader.init(ConfigurationHandler.cfg, 0); - } - catch (IOException e) - { - e.printStackTrace(); - } - - ConfigurationHandler.loadGuideText(FileLoader.getGuideText()); - ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); - - CommandTPPI.initValidCommandArguments(FileLoader.getSupportedModsFile()); + + CommandTPPI.initValidCommandArguments(); ModItems.initItems(); ModBlocks.initBlocks(); - - playerTracker = new TPPIPlayerTracker(); - GameRegistry.registerPlayerTracker(playerTracker); - MinecraftForge.EVENT_BUS.register(playerTracker); } @EventHandler @@ -100,18 +74,6 @@ public void init(FMLInitializationEvent event) @EventHandler public void postInit(FMLPostInitializationEvent event) { - if (FMLCommonHandler.instance().getSide().isClient()) - { - try - { - GuiHelper.initMap(); - } - catch (FileNotFoundException e) - { - e.printStackTrace(); - } - } - AdditionalTweaks.doOreDictTweaks(); AdditionalTweaks.addMiscRecipes(); } diff --git a/src/main/java/tppitweaks/client/gui/ConfigGui.java b/src/main/java/tppitweaks/client/gui/ConfigGui.java index 39e3a5e..bde7e3a 100644 --- a/src/main/java/tppitweaks/client/gui/ConfigGui.java +++ b/src/main/java/tppitweaks/client/gui/ConfigGui.java @@ -10,14 +10,15 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) +@Deprecated public class ConfigGui extends GuiScreen { - + public ConfigGui() { - + } - + @SuppressWarnings("unchecked") @Override public void initGui() @@ -25,44 +26,39 @@ public void initGui() this.buttonList.add(new GuiButton(13, this.width / 2 - 100, 60, 200, 20, "Enable Hard Mode")); this.buttonList.add(new GuiButton(0, this.width / 2 - 100, 200, 200, 20, "Continue")); } - + @Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); - - this.drawCenteredString(this.fontRenderer, "Config Options", this.width / 2, 10, 0xFFFFFF); + + this.drawCenteredString(this.fontRenderer, "Config Options", this.width / 2, 10, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, "Use hard mode configs?", this.width / 2, 40, 0xFFFFFF); - + this.drawCenteredString(this.fontRenderer, "The hard mode config enables all GT nerfs, as well as all", this.width / 2, 114, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, "expsnsive versions of recpies", this.width / 2, 124, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, "NOTE: You will have to restart Minecraft in order for the", this.width / 2, 134, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, "config change to take effect", this.width / 2, 144, 0xFFFFFF); - + super.drawScreen(par1, par2, par3); } - + @Override public void actionPerformed(GuiButton button) { - switch(button.id) { - case 13: - try - { - File file=new File("config/TPPI/config/hardconfig.zip"); - Unzipper.unzipFiles(new FileInputStream(file), "config"); - GuiHelper.updateGui.actionPerformed(button); - break; - } - catch (Exception e) - { - e.printStackTrace(); - } - - default: - GuiHelper.updateGui.actionPerformed(button); + switch (button.id) + { + case 13: + try + { + File file = new File("config/TPPI/config/hardconfig.zip"); + Unzipper.unzipFiles(new FileInputStream(file), "config"); + break; + } + catch (Exception e) + { + e.printStackTrace(); + } } - } - } diff --git a/src/main/java/tppitweaks/client/gui/GuiHelper.java b/src/main/java/tppitweaks/client/gui/GuiHelper.java deleted file mode 100644 index 5a414a4..0000000 --- a/src/main/java/tppitweaks/client/gui/GuiHelper.java +++ /dev/null @@ -1,35 +0,0 @@ -package tppitweaks.client.gui; - -import java.io.FileNotFoundException; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiScreenBook; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import tppitweaks.client.gui.modGuides.GuiGuideBase; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class GuiHelper { - - @SideOnly(Side.CLIENT) - public static UpdateGui updateGui; - - public static void doBookGUI(EntityPlayer player, ItemStack stack, boolean par3) { - Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(player, stack, par3)); - } - - public static void doDownloaderGUI() { - Minecraft.getMinecraft().displayGuiScreen((updateGui = new UpdateGui(Minecraft.getMinecraft().currentScreen, false))); - } - - public static void doGuideGUI() - { - Minecraft.getMinecraft().displayGuiScreen(new GuiGuideBase()); - } - - public static void initMap() throws FileNotFoundException - { - GuiGuideBase.initMap(); - } -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/client/gui/InstructionsGui.java b/src/main/java/tppitweaks/client/gui/InstructionsGui.java deleted file mode 100644 index 687e237..0000000 --- a/src/main/java/tppitweaks/client/gui/InstructionsGui.java +++ /dev/null @@ -1,149 +0,0 @@ -package tppitweaks.client.gui; - -import java.awt.Component; -import java.awt.HeadlessException; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.util.logging.Level; - -import javax.swing.JDialog; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.UIManager; -import javax.swing.filechooser.FileFilter; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; - -import org.apache.commons.io.FileUtils; - -import tppitweaks.TPPITweaks; -import tppitweaks.lib.Reference; -import tppitweaks.util.DesktopApi; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class InstructionsGui extends GuiScreen -{ - - ModDownload mod; - int hasOpened = 0; - - private static File lastDir = FileUtils.getUserDirectory(); - - public InstructionsGui(ModDownload modDownload) - { - mod = modDownload; - } - - @SuppressWarnings("unchecked") - @Override - public void initGui() - { - this.buttonList.add(new GuiButton(11, this.width / 2 - 100, this.height / 2 - 60, 200, 20, "Download")); - this.buttonList.add(new GuiButton(12, this.width / 2 - 100, this.height / 2, 200, 20, "Find Mod")); - this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2 + 70, 200, 20, "Continue")); - } - - @Override - public void drawScreen(int par1, int par2, float par3) - { - this.drawDefaultBackground(); - - this.drawCenteredString(this.fontRenderer, mod.name, this.width / 2, this.height / 2 - 115, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "1. Click the button below to download " + mod.name + ",", this.width / 2, this.height / 2 - 95, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "or press continue at the bottom to skip installation.", this.width / 2, this.height / 2 - 85, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "(for adfly, wait 5 seconds then click \"SKIP AD\" in the upper right)", this.width / 2, this.height / 2 - 75, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "Select the file from your computer and it will be added to the mods directory.", this.width / 2, this.height / 2 - 15, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "3. Press the button below to continue.", this.width / 2, this.height / 2 + 55, 0xFFFFFF); - - hasOpened = hasOpened <= 0 ? 0 : hasOpened - 1; - - super.drawScreen(par1, par2, par3); - } - - @Override - public void actionPerformed(GuiButton button) - { - switch (button.id) - { - case 11: - try - { - DesktopApi.browse(new URI(mod.link)); - } - catch (Exception e1) - { - TPPITweaks.logger.log(Level.SEVERE, "Failed to reach " + mod.name + "'s download page!"); - e1.printStackTrace(); - } - break; - - case 12: - if (hasOpened == 0) - { - try - { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } - catch (Exception e) - { - e.printStackTrace(); - } - - @SuppressWarnings("serial") - JFileChooser fc = new JFileChooser() - { - @Override - protected JDialog createDialog(Component parent) throws HeadlessException - { - // intercept the dialog created by JFileChooser - JDialog dialog = super.createDialog(parent); - dialog.setModal(true); - dialog.setAlwaysOnTop(true); - return dialog; - } - }; - - fc.setFileFilter(new FileFilter() - { - @Override - public String getDescription() - { - return "*.jar, *.zip"; - } - - @Override - public boolean accept(File arg0) - { - return (arg0.getName().endsWith(".zip") || arg0.getName().endsWith(".jar") || arg0.isDirectory()); - } - }); - - fc.setCurrentDirectory(lastDir); - fc.showOpenDialog(new JFrame()); - File mod = fc.getSelectedFile(); - lastDir = mod == null ? lastDir : mod.getParentFile(); - try - { - if (mod != null) - FileUtils.moveFile(mod, new File(Reference.modsFolder.getCanonicalPath() + "/" + mod.getName())); - } - catch (IOException e) - { - e.printStackTrace(); - } - hasOpened = 50; - } - break; - - default: - hasOpened = 0; - GuiHelper.updateGui.actionPerformed(button); - } - - } - -} diff --git a/src/main/java/tppitweaks/client/gui/MaricultureGui.java b/src/main/java/tppitweaks/client/gui/MaricultureGui.java index e378fe1..2db39b7 100644 --- a/src/main/java/tppitweaks/client/gui/MaricultureGui.java +++ b/src/main/java/tppitweaks/client/gui/MaricultureGui.java @@ -3,7 +3,7 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.util.FileLoader; +import tppitweaks.util.TPPITweaksUtils; public class MaricultureGui extends GuiScreen { @@ -43,10 +43,10 @@ protected void actionPerformed(GuiButton button) switch (button.id) { case 0: - FileLoader.enableMod("Mariculture", ".disabled"); + TPPITweaksUtils.enableMod("Mariculture", ".disabled"); break; case 1: - FileLoader.disableMod("Mariculture", ".disabled"); + TPPITweaksUtils.disableMod("Mariculture", ".disabled"); break; case 2: System.exit(0); diff --git a/src/main/java/tppitweaks/client/gui/ModDownload.java b/src/main/java/tppitweaks/client/gui/ModDownload.java deleted file mode 100644 index f478182..0000000 --- a/src/main/java/tppitweaks/client/gui/ModDownload.java +++ /dev/null @@ -1,14 +0,0 @@ -package tppitweaks.client.gui; - -public class ModDownload -{ - - public String name, link, modid; - - public ModDownload(String name, String link, String modid) - { - this.name = name; - this.link = link; - this.modid = modid; - } -} diff --git a/src/main/java/tppitweaks/client/gui/RestartGui.java b/src/main/java/tppitweaks/client/gui/RestartGui.java deleted file mode 100644 index 0cd155d..0000000 --- a/src/main/java/tppitweaks/client/gui/RestartGui.java +++ /dev/null @@ -1,44 +0,0 @@ -package tppitweaks.client.gui; - -import java.util.logging.Level; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import tppitweaks.TPPITweaks; -import tppitweaks.config.ConfigurationHandler; - -public class RestartGui extends GuiScreen -{ - @SuppressWarnings("unchecked") - @Override - public void initGui() - { - this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2, 200, 20, "Exit the game")); - this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 2 + 30, 200, 20, "Don't exit (mods will not be loaded)")); - } - - @Override - public void drawScreen(int par1, int par2, float par3) - { - this.drawDefaultBackground(); - - this.drawCenteredString(this.fontRenderer, "You have installed all desired mods!", this.width / 2, this.height / 2 - 40, 0xFFFFFF); - this.drawCenteredString(this.fontRenderer, "However, you must restart Minecraft for your changes to take effect.", this.width / 2, this.height / 2 - 20, 0xFFFFFF); - - super.drawScreen(par1, par2, par3); - } - - @Override - protected void actionPerformed(GuiButton button) - { - if (button.id == 0) - { - System.exit(0); - } - else - { - TPPITweaks.logger.log(Level.INFO, "Mod installations finished! Restart minecraft for your changes to take effect."); - this.mc.displayGuiScreen(ConfigurationHandler.showMaricultureGui ? new MaricultureGui() : null); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/UpdateGui.java b/src/main/java/tppitweaks/client/gui/UpdateGui.java deleted file mode 100644 index 5d4e566..0000000 --- a/src/main/java/tppitweaks/client/gui/UpdateGui.java +++ /dev/null @@ -1,153 +0,0 @@ -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 tppitweaks.config.ConfigurationHandler; -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() - { - // No mods here! I'll leave the code for posterity's sake, as well as for others to use. - - 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) - { - TPPITweaks.logger.info("not opening GUI"); - this.mc.displayGuiScreen(this.parentScreen); - return; - } - - // 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(ConfigurationHandler.showMaricultureGui ? new MaricultureGui() : 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(ConfigurationHandler.showMaricultureGui ? new MaricultureGui() : new RestartGui()); - } - else - { - this.mc.displayGuiScreen(ConfigurationHandler.showMaricultureGui ? new MaricultureGui() : 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); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/container/ContainerBase.java b/src/main/java/tppitweaks/client/gui/library/container/ContainerBase.java deleted file mode 100644 index 73f0ae6..0000000 --- a/src/main/java/tppitweaks/client/gui/library/container/ContainerBase.java +++ /dev/null @@ -1,207 +0,0 @@ -package tppitweaks.client.gui.library.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerBase extends Container -{ - public Object object; - - public ContainerBase() - { - - } - - public ContainerBase(Object obj) - { - object = obj; - } - - public ContainerBase addPlayerInventorySlots(EntityPlayer player) - { - // TODO - return this; - } - - @Override - public boolean canInteractWith(EntityPlayer entityplayer) - { - return object instanceof IInventory ? ((IInventory) object).isUseableByPlayer(entityplayer) : true; - } - - public String getUnlocalizedName() - { - return "container.empty"; - } - - @Override - protected boolean mergeItemStack(ItemStack stack, int startPos, int endPos, boolean reverse) - { - boolean flag1 = false; - int k = startPos; - - if (reverse) - { - k = endPos - 1; - } - - Slot slot; - ItemStack itemstack1; - - if (stack.isStackable()) - { - while (stack.stackSize > 0 && (!reverse && k < endPos || reverse && k >= startPos)) - { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) - { - if (reverse) - { - --k; - } - else - { - ++k; - } - - continue; - } - - if (itemstack1 != null && itemstack1.itemID == stack.itemID && (!stack.getHasSubtypes() || stack.getItemDamage() == itemstack1.getItemDamage()) && ItemStack.areItemStackTagsEqual(stack, itemstack1)) - { - int l = itemstack1.stackSize + stack.stackSize; - - if (l <= stack.getMaxStackSize()) - { - stack.stackSize = 0; - itemstack1.stackSize = l; - slot.onSlotChanged(); - flag1 = true; - } - else if (itemstack1.stackSize < stack.getMaxStackSize()) - { - stack.stackSize -= stack.getMaxStackSize() - itemstack1.stackSize; - itemstack1.stackSize = stack.getMaxStackSize(); - slot.onSlotChanged(); - flag1 = true; - } - } - - if (reverse) - { - --k; - } - else - { - ++k; - } - } - } - - if (stack.stackSize > 0) - { - if (reverse) - { - k = endPos - 1; - } - else - { - k = startPos; - } - - while (!reverse && k < endPos || reverse && k >= startPos) - { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) - { - if (reverse) - { - --k; - } - else - { - ++k; - } - - continue; - } - - if (itemstack1 == null) - { - slot.putStack(stack.copy()); - slot.onSlotChanged(); - stack.stackSize = 0; - flag1 = true; - break; - } - - if (reverse) - { - --k; - } - else - { - ++k; - } - } - } - - return flag1; - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot) - { - if (object instanceof IInventory) - { - int containerSlotCount = ((IInventory) object).getSizeInventory(); - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slot); - - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - - if (slot < containerSlotCount) - { - if (!mergeItemStack(stackInSlot, 0, 35, true)) - { - return null; - } - } - else if (!mergeItemStack(stackInSlot, 0, containerSlotCount, false)) - { - return null; - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } - else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } - - return null; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/GuiBase.java b/src/main/java/tppitweaks/client/gui/library/gui/GuiBase.java deleted file mode 100644 index 2f85088..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/GuiBase.java +++ /dev/null @@ -1,362 +0,0 @@ -package tppitweaks.client.gui.library.gui; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import tppitweaks.client.gui.library.gui.element.ElementBase; -import tppitweaks.client.gui.library.gui.element.ElementFakeItemSlot; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; -import cofh.gui.element.TabBase; - -/** - * A modular gui without the need for an inventory. This should be used instead of {@link GuiBaseContainer} if you do not require an inventory to be displayed on the screen. - * - * @author Alz454 - */ -public class GuiBase extends GuiScreen implements IGuiBase -{ - protected RenderItem itemRenderer = new RenderItem(); - - protected int xSize = 176; - protected int ySize = 166; - protected int guiLeft; - protected int guiTop; - - protected int mouseX = 0; - protected int mouseY = 0; - - protected int lastIndex = -1; - - protected boolean drawName = true; - - protected String name; - protected ResourceLocation texture; - protected ArrayList tabs = new ArrayList(); - protected ArrayList elements = new ArrayList(); - protected List tooltip = new LinkedList(); - - public GuiBase() - { - - } - - public GuiBase(ResourceLocation texture) - { - this.texture = texture; - } - - @Override - public ElementBase addElement(ElementBase element) - { - elements.add(element); - - return element; - } - - @Override - public void addElements() - { - - } - - @Override - public void addTabs() - { - - } - - @Override - public boolean doesGuiPauseGame() - { - return false; - } - - @Override - public void drawBackgroundTexture() - { - if (texture != null) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - getMinecraft().renderEngine.bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } - } - - @Override - public void drawElements() - { - for (ElementBase element : elements) - { - element.update(); - - if (element.isVisible()) - { - element.draw(); - } - } - } - - public void drawGuiBackgroundLayer(float f, int mouseX, int mouseY) - { - this.mouseX = mouseX - guiLeft; - this.mouseY = mouseY - guiTop; - - drawBackgroundTexture(); - drawElements(); - drawTabs(); - } - - public void drawGuiForegroundLayer(int mouseX, int mouseY) - { - if (drawName) - { - fontRenderer.drawString(StatCollector.translateToLocal(name), GuiUtils.getCenteredOffset(this, StatCollector.translateToLocal(name), xSize), 6, 0x404040); - } - - ElementBase element = getElementAtPosition(mouseX - guiLeft, mouseY - guiTop); - - if (element != null && !element.isDisabled()) - { - List list = new ArrayList(); - element.addTooltip(list); - - if (!list.isEmpty()) - { - GuiUtils.drawTooltipHoveringText(this, list, mouseX - guiLeft, mouseY - guiTop); - return; - } - } - } - - @Override - public void drawScreen(int mouseX, int mouseY, float f) - { - drawDefaultBackground(); - drawBackgroundTexture(); - drawGuiBackgroundLayer(f, mouseX, mouseY); - - float left = guiLeft, top = guiTop; - - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - - super.drawScreen(mouseX, mouseY, f); - - RenderHelper.enableGUIStandardItemLighting(); - GL11.glPushMatrix(); - GL11.glTranslatef(left, top, 0.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f / 1.0F, 240f / 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDisable(GL11.GL_LIGHTING); - - drawGuiForegroundLayer(mouseX, mouseY); - - GL11.glPopMatrix(); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - RenderHelper.enableStandardItemLighting(); - } - - @Override - public void drawTabs() - { - int yPosRight = 4; - int yPosLeft = 4; - - for (TabBase tab : tabs) - { - tab.update(); - - if (tab.isVisible()) - { - if (tab.side == 0) - { - tab.draw(guiLeft, guiTop + yPosLeft); - yPosLeft += tab.currentHeight; - } - else - { - tab.draw(guiLeft + xSize, guiTop + yPosRight); - yPosRight += tab.currentHeight; - } - } - } - - } - - @Override - public ElementBase getElementAtPosition(int mouseX, int mouseY) - { - for (ElementBase element : elements) - { - if (element.isVisible() && element.intersectsWith(mouseX, mouseY)) - { - return element; - } - } - - return null; - } - - @Override - public FontRenderer getFontRenderer() - { - return fontRenderer; - } - - @Override - public int getGuiLeft() - { - return guiLeft; - } - - @Override - public int getGuiTop() - { - return guiTop; - } - - @Override - public int getHeight() - { - return height; - } - - @Override - public RenderItem getItemRenderer() - { - return itemRenderer; - } - - @Override - public Minecraft getMinecraft() - { - return mc; - } - - @Override - public int getMouseX() - { - return mouseX; - } - - @Override - public int getMouseY() - { - return mouseY; - } - - @Override - public TextureManager getTextureManager() - { - return getMinecraft().renderEngine; - } - - @Override - public int getWidth() - { - return width; - } - - @Override - public float getZLevel() - { - return zLevel; - } - - @Override - public void handleElementButtonClick(String buttonName, int mouseButton) - { - - } - - @Override - public void handleElementFakeSlotItemChange(ElementFakeItemSlot slot) - { - - } - - @Override - public void initGui() - { - super.initGui(); - guiLeft = (width - xSize) / 2; - guiTop = (height - ySize) / 2; - - tabs.clear(); - elements.clear(); - buttonList.clear(); - - addElements(); - addTabs(); - } - - @Override - public boolean isItemStackAllowedInFakeSlot(ElementFakeItemSlot slot, ItemStack stack) - { - return false; - } - - @Override - protected void keyTyped(char character, int index) - { - super.keyTyped(character, index); - - if (index == 1 || index == getMinecraft().gameSettings.keyBindInventory.keyCode) - { - getMinecraft().thePlayer.closeScreen(); - } - } - - @Override - protected void mouseClicked(int mouseX, int mouseY, int mouseButton) - { - super.mouseClicked(mouseX, mouseY, mouseButton); - - ElementBase element = getElementAtPosition(mouseX - guiLeft, mouseY - guiTop); - - if (element != null) - { - if (element.isVisible()) - { - element.handleMouseClicked(mouseX - guiLeft, mouseY - guiTop, mouseButton); - } - } - } - - @Override - public void setZLevel(float zlevel) - { - zLevel = zlevel; - } - - @Override - public void updateScreen() - { - super.updateScreen(); - - if (!getMinecraft().thePlayer.isEntityAlive() || getMinecraft().thePlayer.isDead) - { - getMinecraft().thePlayer.closeScreen(); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/GuiBaseContainer.java b/src/main/java/tppitweaks/client/gui/library/gui/GuiBaseContainer.java deleted file mode 100644 index 10e0af9..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/GuiBaseContainer.java +++ /dev/null @@ -1,311 +0,0 @@ -package tppitweaks.client.gui.library.gui; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.inventory.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.container.ContainerBase; -import tppitweaks.client.gui.library.gui.element.ElementBase; -import tppitweaks.client.gui.library.gui.element.ElementFakeItemSlot; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; -import codechicken.nei.VisiblityData; -import codechicken.nei.api.INEIGuiHandler; -import codechicken.nei.api.TaggedInventoryArea; -import cofh.gui.element.TabBase; - -/** - * Base class for a modular GUIs. Works with Elements {@link ElementBase} and Tabs {@link TabBase} which are both modular elements. Use if your GUI requires access to an inventory. Based off of - * GuiBase by King Lemming. - * - * @author Alz454 - * - */ -public abstract class GuiBaseContainer extends GuiContainer implements INEIGuiHandler, IGuiBase -{ - protected boolean drawInventory = true; - - protected int mouseX = 0; - protected int mouseY = 0; - - protected int lastIndex = -1; - - protected boolean drawName = true; - - protected String name; - protected ResourceLocation texture; - - protected ArrayList elements = new ArrayList(); - - public GuiBaseContainer() - { - super(new ContainerBase()); - } - - public GuiBaseContainer(Container container) - { - super(container); - } - - public GuiBaseContainer(Container container, ResourceLocation texture) - { - super(container); - this.texture = texture; - } - - public GuiBaseContainer(ResourceLocation texture) - { - this(new ContainerBase(), texture); - } - - @Override - public ElementBase addElement(ElementBase element) - { - elements.add(element); - - return element; - } - - @Override - public void addElements() - { - - } - - @Override - public void addTabs() - { - - } - - @Override - public void drawBackgroundTexture() - { - if (texture != null) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - getMinecraft().renderEngine.bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } - } - - @Override - public void drawElements() - { - for (ElementBase element : elements) - { - element.update(); - - if (element.isVisible()) - { - element.draw(); - } - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - mouseX = mouseX - guiLeft; - mouseY = mouseY - guiTop; - - drawBackgroundTexture(); - drawBackgroundTexture(); - drawElements(); - drawTabs(); - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - if (drawName) - { - fontRenderer.drawString(StatCollector.translateToLocal(name), GuiUtils.getCenteredOffset(this, StatCollector.translateToLocal(name), xSize), 6, 0x404040); - } - - if (drawInventory) - { - fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 3, 0x404040); - } - - ElementBase element = getElementAtPosition(mouseX - guiLeft, mouseY - guiTop); - - if (element != null && !element.isDisabled()) - { - List list = new ArrayList(); - element.addTooltip(list); - - if (!list.isEmpty()) - { - GuiUtils.drawTooltipHoveringText(this, list, mouseX - guiLeft, mouseY - guiTop); - return; - } - } - } - - @Override - public ElementBase getElementAtPosition(int mouseX, int mouseY) - { - for (ElementBase element : elements) - { - if (element.isVisible() && element.intersectsWith(mouseX, mouseY)) - { - return element; - } - } - - return null; - } - - @Override - public FontRenderer getFontRenderer() - { - return fontRenderer; - } - - @Override - public int getGuiLeft() - { - return guiLeft; - } - - @Override - public int getGuiTop() - { - return guiTop; - } - - @Override - public int getHeight() - { - return height; - } - - @Override - public List getInventoryAreas(GuiContainer gui) - { - return null; - } - - @Override - public RenderItem getItemRenderer() - { - return itemRenderer; - } - - @Override - public int getItemSpawnSlot(GuiContainer gui, ItemStack item) - { - return 0; - } - - @Override - public Minecraft getMinecraft() - { - return mc; - } - - @Override - public int getMouseX() - { - return mouseX; - } - - @Override - public int getMouseY() - { - return mouseY; - } - - @Override - public TextureManager getTextureManager() - { - return getMinecraft().renderEngine; - } - - @Override - public int getWidth() - { - return width; - } - - @Override - public float getZLevel() - { - return zLevel; - } - - @Override - public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) - { - return false; - } - - @Override - public void handleElementButtonClick(String buttonName, int mouseButton) - { - - } - - @Override - public void handleElementFakeSlotItemChange(ElementFakeItemSlot slot) - { - - } - - @Override - public void initGui() - { - super.initGui(); - - elements.clear(); - buttonList.clear(); - - addElements(); - addTabs(); - } - - @Override - public boolean isItemStackAllowedInFakeSlot(ElementFakeItemSlot slot, ItemStack stack) - { - return false; - } - - @Override - public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) - { - return null; - } - - @Override - protected void mouseClicked(int mouseX, int mouseY, int mouseButton) - { - super.mouseClicked(mouseX, mouseY, mouseButton); - - ElementBase element = getElementAtPosition(mouseX - guiLeft, mouseY - guiTop); - - if (element != null) - { - if (element.isVisible()) - { - element.handleMouseClicked(mouseX - guiLeft, mouseY - guiTop, mouseButton); - } - } - } - - @Override - public void setZLevel(float zlevel) - { - zLevel = zlevel; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/IGuiBase.java b/src/main/java/tppitweaks/client/gui/library/gui/IGuiBase.java deleted file mode 100644 index 8d49f0c..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/IGuiBase.java +++ /dev/null @@ -1,56 +0,0 @@ -package tppitweaks.client.gui.library.gui; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.item.ItemStack; -import tppitweaks.client.gui.library.gui.element.ElementBase; -import tppitweaks.client.gui.library.gui.element.ElementFakeItemSlot; - -public interface IGuiBase -{ - public ElementBase addElement(ElementBase element); - - public void addElements(); - - public void addTabs(); - - public void drawBackgroundTexture(); - - public void drawElements(); - - public void drawTabs(); - - public ElementBase getElementAtPosition(int mouseX, int mouseY); - - public FontRenderer getFontRenderer(); - - public int getGuiLeft(); - - public int getGuiTop(); - - public int getHeight(); - - public RenderItem getItemRenderer(); - - public Minecraft getMinecraft(); - - public int getMouseX(); - - public int getMouseY(); - - public TextureManager getTextureManager(); - - public int getWidth(); - - public float getZLevel(); - - public void handleElementButtonClick(String buttonName, int mouseButton); - - public void handleElementFakeSlotItemChange(ElementFakeItemSlot slot); - - public boolean isItemStackAllowedInFakeSlot(ElementFakeItemSlot slot, ItemStack stack); - - public void setZLevel(float zlevel); -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/Parser.java b/src/main/java/tppitweaks/client/gui/library/gui/Parser.java deleted file mode 100644 index 2fd722c..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/Parser.java +++ /dev/null @@ -1,79 +0,0 @@ -package tppitweaks.client.gui.library.gui; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import tppitweaks.client.gui.library.gui.element.ElementBase; -import tppitweaks.client.gui.library.gui.element.ElementBaseContainer; -import tppitweaks.client.gui.library.gui.element.ElementCrafting; -import tppitweaks.client.gui.library.gui.element.ElementScrollPanel; -import tppitweaks.client.gui.library.gui.element.ElementText; - -/*** - * Turns a string into multiple GUI elements for use within a {@link ElementBaseContainer} or {@link ElementScrollPanel}. - * - * @author Alz454 - */ -public class Parser -{ - FontRenderer fontRenderer; - IGuiBase parentGui; - ArrayList parsedElements; - int maxWidth, currentX, currentY; - - public Parser(IGuiBase parent) - { - parsedElements = new ArrayList(); - parentGui = parent; - maxWidth = -1; - currentX = currentY = 0; - fontRenderer = Minecraft.getMinecraft().fontRenderer; - } - - public ArrayList parse(String string) - { - // testing, for now - parsedElements.add(new ElementCrafting(parentGui, maxWidth / 2 - 5, currentY, 0).addAllGridSlots(new ItemStack[] { new ItemStack(Block.stone), new ItemStack(Block.stone), null, new ItemStack(Block.stone), new ItemStack(Block.stone), null, null, null, null }).addOutputSlot(new ItemStack(Block.stoneBrick))); - parsedElements.add(new ElementCrafting(parentGui, 0, currentY, 1).addBothFurnaceSlots(new ItemStack[] { new ItemStack(Block.cobblestone), new ItemStack(Item.coal) }).addOutputSlot(new ItemStack(Block.stone))); - currentY += parsedElements.get(parsedElements.size() - 1).getHeight() + 5; - parseText(string); - currentY += 5; - parsedElements.add(new ElementCrafting(parentGui, maxWidth / 2 - 5, currentY, 0).addAllGridSlots(new ItemStack[] { new ItemStack(Block.stone), new ItemStack(Block.stone), null, new ItemStack(Block.stone), new ItemStack(Block.stone), null, null, null, null }).addOutputSlot(new ItemStack(Block.stoneBrick))); - parsedElements.add(new ElementCrafting(parentGui, 0, currentY, 1).addBothFurnaceSlots(new ItemStack[] { new ItemStack(Block.cobblestone), new ItemStack(Item.coal) }).addOutputSlot(new ItemStack(Block.stone))); - currentY += parsedElements.get(parsedElements.size() - 1).getHeight() + 5; - parseText("And that's how you make Stone Bricks!"); - - return parsedElements; - } - - @SuppressWarnings("unchecked") - private void parseText(String string) - { - if (maxWidth != -1 && fontRenderer.getStringWidth(string) > maxWidth) - { - List list = fontRenderer.listFormattedStringToWidth(string, maxWidth); - - for (Iterator iterator = list.iterator(); iterator.hasNext(); currentY += fontRenderer.FONT_HEIGHT) - { - parsedElements.add(new ElementText(parentGui, currentX, currentY, iterator.next(), null, 0xFFFFFF, false)); - } - } - else - { - parsedElements.add(new ElementText(parentGui, currentX, currentY, string, null, 0xFFFFFF, false)); - currentX += fontRenderer.getStringWidth(string); - } - } - - public Parser setMaxWidth(int width) - { - maxWidth = width; - return this; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/button/GuiBetterSlider.java b/src/main/java/tppitweaks/client/gui/library/gui/button/GuiBetterSlider.java deleted file mode 100644 index e12ad7b..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/button/GuiBetterSlider.java +++ /dev/null @@ -1,100 +0,0 @@ -package tppitweaks.client.gui.library.gui.button; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; - -import org.lwjgl.opengl.GL11; - -public class GuiBetterSlider extends GuiButton -{ - public float sliderValue = 1.0F; - public boolean dragging; - - public GuiBetterSlider(int id, int x, int y, String displayText, float initialValue) - { - super(id, x, y, 150, 20, displayText); - sliderValue = initialValue; - } - - public GuiBetterSlider(int id, int x, int y, String displayText, float initialValue, int w) - { - super(id, x, y, w, 20, displayText); - sliderValue = initialValue; - } - - /** - * Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over this button. - */ - @Override - protected int getHoverState(boolean par1) - { - return 0; - } - - /** - * Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e). - */ - @Override - protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3) - { - if (drawButton) - { - if (dragging) - { - sliderValue = (float) (par2 - (xPosition + 4)) / (float) (width - 8); - - if (sliderValue < 0.0F) - { - sliderValue = 0.0F; - } - - if (sliderValue > 1.0F) - { - sliderValue = 1.0F; - } - } - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - drawTexturedModalRect(xPosition + (int) (sliderValue * (width - 8)), yPosition, 0, 66, 4, 20); - drawTexturedModalRect(xPosition + (int) (sliderValue * (width - 8)) + 4, yPosition, 196, 66, 4, 20); - } - } - - /** - * Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e). - */ - @Override - public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3) - { - if (super.mousePressed(par1Minecraft, par2, par3)) - { - sliderValue = (float) (par2 - (xPosition + 4)) / (float) (width - 8); - - if (sliderValue < 0.0F) - { - sliderValue = 0.0F; - } - - if (sliderValue > 1.0F) - { - sliderValue = 1.0F; - } - - dragging = true; - return true; - } - else - { - return false; - } - } - - /** - * Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e). - */ - @Override - public void mouseReleased(int par1, int par2) - { - dragging = false; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/button/GuiRGBSlider.java b/src/main/java/tppitweaks/client/gui/library/gui/button/GuiRGBSlider.java deleted file mode 100644 index cb3f914..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/button/GuiRGBSlider.java +++ /dev/null @@ -1,75 +0,0 @@ -package tppitweaks.client.gui.library.gui.button; - -import net.minecraft.client.Minecraft; - -import org.lwjgl.opengl.GL11; - -public class GuiRGBSlider extends GuiBetterSlider -{ - String originalText; - - public GuiRGBSlider(int id, int x, int y, String displayText, float initialValue) - { - super(id, x, y, displayText + ": " + (int) (255 * initialValue), initialValue, 113); - originalText = displayText; - } - - public int getValue() - { - return (int) (255 * sliderValue); - } - - @Override - protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3) - { - if (drawButton) - { - if (dragging) - { - sliderValue = (float) (par2 - (xPosition + 4)) / (float) (width - 8); - - if (sliderValue < 0.0F) - { - sliderValue = 0.0F; - } - - if (sliderValue > 1.0F) - { - sliderValue = 1.0F; - } - } - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - displayString = originalText + ": " + (int) (255 * sliderValue); - drawTexturedModalRect(xPosition + (int) (sliderValue * (width - 8)), yPosition, 0, 66, 4, 20); - drawTexturedModalRect(xPosition + (int) (sliderValue * (width - 8)) + 4, yPosition, 196, 66, 4, 20); - } - } - - @Override - public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3) - { - if (super.mousePressed(par1Minecraft, par2, par3)) - { - sliderValue = (float) (par2 - (xPosition + 4)) / (float) (width - 8); - - if (sliderValue < 0.0F) - { - sliderValue = 0.0F; - } - - if (sliderValue > 1.0F) - { - sliderValue = 1.0F; - } - - dragging = true; - displayString = originalText + ": " + (int) (255 * sliderValue); - return true; - } - else - { - return false; - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/button/GuideButton.java b/src/main/java/tppitweaks/client/gui/library/gui/button/GuideButton.java deleted file mode 100644 index e1424c7..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/button/GuideButton.java +++ /dev/null @@ -1,95 +0,0 @@ -package tppitweaks.client.gui.library.gui.button; - -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.GuiBase; -import tppitweaks.client.gui.library.gui.element.ElementBase; -import tppitweaks.client.gui.modGuides.GuiGuideBase; -import tppitweaks.config.ConfigurationHandler; - -public class GuideButton extends ElementBase -{ - private ResourceLocation myButtons = new ResourceLocation("tppitweaks", ConfigurationHandler.guideSkin == 0 ? "textures/gui/guiGuide.png" : "textures/gui/guiGuide_alt.png"); - private int renderID; - - private boolean clicked = false; - - public final static int LINE_HEIGHT = 11; - - public GuideButton(GuiBase gui, int id, int x, int y) - { - super(gui, x, y, id < 8 ? 25 : 31, 18); - // super(gui, x, y, 25, 18); - renderID = id; - } - - @Override - public void draw() - { - draw(this.gui.getMinecraft(), 0, 0); - } - - @Override - public void draw(int x, int y) - { - draw(this.gui.getMinecraft(), x, y); - } - - public void draw(Minecraft minecraft, int i, int j) - { - if (clicked && !Mouse.isButtonDown(0)) - clicked = false; - - minecraft.getTextureManager().bindTexture(myButtons); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - if (this.renderID <= 7) - this.drawTexturedModalRect((int) this.posX, this.posY, renderID * 25, clicked ? 197 : 179, this.sizeX, this.sizeY); - else if (this.renderID == 8) - this.drawTexturedModalRect(posX, posY, renderID * 25, clicked ? 197 : 179, sizeX, sizeY); - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - if (!clicked) - { - switch (renderID) - { - case 0: - ((GuiGuideBase) gui).showModRange('a', 'c'); - break; - case 1: - ((GuiGuideBase) gui).showModRange('d', 'f'); - break; - case 2: - ((GuiGuideBase) gui).showModRange('g', 'i'); - break; - case 3: - ((GuiGuideBase) gui).showModRange('j', 'l'); - break; - case 4: - ((GuiGuideBase) gui).showModRange('m', 'o'); - break; - case 5: - ((GuiGuideBase) gui).showModRange('p', 's'); - break; - case 6: - ((GuiGuideBase) gui).showModRange('t', 'v'); - break; - case 7: - ((GuiGuideBase) gui).showModRange('w', 'z'); - break; - case 8: - ((GuiGuideBase) gui).setDefaultText(false); - break; - } - } - clicked = Mouse.isButtonDown(0); - return clicked; - } -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBase.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBase.java deleted file mode 100644 index 7270465..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBase.java +++ /dev/null @@ -1,174 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.audio.SoundManager; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.util.ResourceLocation; -import tppitweaks.client.gui.library.gui.GuiBaseContainer; -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; -import cpw.mods.fml.client.FMLClientHandler; - -/** - * Base class for a modular GUI element. Has self-contained rendering methods and a link back to the {@link GuiBaseContainer} it is a part of. - * - * @author King Lemming, Alz454 - */ -public abstract class ElementBase -{ - public static final SoundManager elementSoundManager = FMLClientHandler.instance().getClient().sndManager; - public static final FontRenderer elementFontRenderer = FMLClientHandler.instance().getClient().fontRenderer; - - protected IGuiBase gui; - protected ResourceLocation texture = new ResourceLocation("alzlib", "textures/gui/elements.png"); - - protected int posX, posY, relativePosX, relativePosY, sizeX, sizeY, texW = 256, texH = 256; - - protected String name; - - protected boolean visible = true, disabled = false; - protected ArrayList hoverText; - - public ElementBase(IGuiBase gui, int posX, int posY) - { - this.gui = gui; - relativePosX = posX; - relativePosY = posY; - this.posX = gui.getGuiLeft() + posX; - this.posY = gui.getGuiTop() + posY; - } - - public ElementBase(IGuiBase gui, int posX, int posY, int sizeX, int sizeY) - { - this(gui, posX, posY); - this.sizeX = sizeX; - this.sizeY = sizeY; - } - - public void addTooltip(List list) - { - - } - - public abstract void draw(); - - public void draw(int x, int y) - { - posX = x; - posY = y; - draw(); - } - - public void drawTexturedModalRect(int x, int y, int u, int v, int width, int height) - { - GuiUtils.drawSizedTexturedModalRect(gui, x, y, u, v, width, height, texW, texH); - } - - public int getHeight() - { - return sizeY; - } - - public String getName() - { - return name; - } - - public int getRelativeX() - { - return relativePosX; - } - - public int getRelativeY() - { - return relativePosY; - } - - public int getWidth() - { - return sizeX; - } - - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - return false; - } - - public boolean intersectsWith(int mouseX, int mouseY) - { - mouseX += gui.getGuiLeft(); - mouseY += gui.getGuiTop(); - - if (mouseX >= posX && mouseX < posX + sizeX && mouseY >= posY && mouseY < posY + sizeY) - { - return true; - } - - return false; - } - - public boolean isDisabled() - { - return disabled; - } - - public boolean isVisible() - { - return visible; - } - - public ElementBase setDisabled(boolean disabled) - { - this.disabled = disabled; - - return this; - } - - public ElementBase setName(String name) - { - this.name = name; - - return this; - } - - public ElementBase setPosition(int posX, int posY) - { - this.posX = gui.getGuiLeft() + posX; - this.posY = gui.getGuiTop() + posY; - relativePosX = posX; - relativePosY = posY; - - return this; - } - - public ElementBase setSize(int sizeX, int sizeY) - { - this.sizeX = sizeX; - this.sizeY = sizeY; - - return this; - } - - public ElementBase setTexture(String texture, int texW, int texH) - { - this.texture = new ResourceLocation(texture); - this.texW = texW; - this.texH = texH; - - return this; - } - - public ElementBase setVisible(boolean visible) - { - this.visible = visible; - - return this; - } - - public void update() - { - - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBaseContainer.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBaseContainer.java deleted file mode 100644 index f8721a2..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBaseContainer.java +++ /dev/null @@ -1,103 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.Parser; - -public abstract class ElementBaseContainer extends ElementBase -{ - protected ArrayList elements; - - public ElementBaseContainer(IGuiBase parent, int x, int y, int w, int h) - { - super(parent, x, y, w, h); - elements = new ArrayList(); - } - - public ElementBaseContainer addElement(ElementBase element) - { - elements.add(element); - - return this; - } - - @Override - public void addTooltip(List list) - { - for (ElementBase element : elements) - { - if (element.intersectsWith(gui.getMouseX(), gui.getMouseY())) - { - element.addTooltip(list); - - if (!list.isEmpty()) - { - return; - } - } - } - } - - public void clear() - { - elements.clear(); - } - - @Override - public void draw() - { - for (ElementBase element : elements) - { - if (element.isVisible()) - { - element.draw(posX + element.getRelativeX(), posY + element.getRelativeY()); - GL11.glDisable(GL11.GL_LIGHTING); - } - } - } - - public ArrayList getElements() - { - return elements; - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - for (ElementBase element : elements) - { - if (element.isVisible() && element.intersectsWith(x, y)) - { - if (element.handleMouseClicked(x, y, mouseButton)) - { - return true; - } - } - } - - return false; - } - - public ElementBaseContainer parseElements(String string) - { - for (ElementBase element : new Parser(gui).setMaxWidth(sizeX).parse(string)) - { - addElement(element); - } - - return this; - } - - @Override - public void update() - { - for (ElementBase element : elements) - { - element.update(); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBubbles.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBubbles.java deleted file mode 100644 index 814f380..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementBubbles.java +++ /dev/null @@ -1,59 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementBubbles extends ElementProgressBar -{ - boolean showTooltip; - - public ElementBubbles(IGuiBase parent, int x, int y) - { - this(parent, x, y, 0, 100, false); - } - - public ElementBubbles(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max, false); - } - - public ElementBubbles(IGuiBase parent, int x, int y, int progress, int max, boolean tooltip) - { - super(parent, x, y, progress, max); - sizeX = 10; - sizeY = 28; - showTooltip = tooltip; - } - - @Override - public void addTooltip(List list) - { - if (showTooltip) - { - super.addTooltip(list); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 16, 26, sizeX, sizeY); - - if (!isDisabled()) - { - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - } - - drawTexturedModalRect(posX, posY + sizeY - height, 16 + sizeX, 26 + sizeY - height, sizeX + 1, height); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButton.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButton.java deleted file mode 100644 index 2b933b2..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButton.java +++ /dev/null @@ -1,87 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.Minecraft; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementButton extends ElementBase -{ - protected String ID, displayText, hoverString; - - public ElementButton(IGuiBase parent, int x, int y, int w, String id, String text) - { - this(parent, x, y, w, id, text, ""); - } - - public ElementButton(IGuiBase parent, int x, int y, int w, String id, String text, ArrayList hover) - { - this(parent, x, y, w, id, text, ""); - hoverText = hover; - } - - public ElementButton(IGuiBase parent, int x, int y, int w, String id, String text, String hover) - { - super(parent, x, y, w, 20); - ID = id; - displayText = text; - hoverString = hover; - } - - @Override - public void addTooltip(List list) - { - if (hoverText != null) - { - for (String s : hoverText) - { - list.add(s); - } - } - else if (hoverString != null && hoverString.length() > 0) - { - list.add(hoverString); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 0, 196 + (!isDisabled() ? intersectsWith(gui.getMouseX(), gui.getMouseY()) ? sizeY * 2 : sizeY : 0), sizeX / 2, sizeY); - drawTexturedModalRect(posX + sizeX / 2, posY, 200 - sizeX / 2, 196 + (!isDisabled() ? intersectsWith(gui.getMouseX(), gui.getMouseY()) ? sizeY * 2 : sizeY : 0), sizeX / 2, sizeY); - - if (displayText != null) - { - gui.getFontRenderer().drawStringWithShadow(displayText, posX + sizeX / 2 - gui.getFontRenderer().getStringWidth(displayText) / 2, posY + sizeY / 2 - gui.getFontRenderer().FONT_HEIGHT / 2, !isDisabled() ? intersectsWith(gui.getMouseX(), gui.getMouseY()) ? 16777120 : 14737632 : -6250336); - } - } - - public String getID() - { - return ID; - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - if (!isDisabled() && isVisible()) - { - Minecraft.getMinecraft().sndManager.playSoundFX("random.click", 1.0F, 1.0F); - gui.handleElementButtonClick(ID, mouseButton); - return true; - } - - return false; - } - - public void setText(String string) - { - displayText = string; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButtonIcon.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButtonIcon.java deleted file mode 100644 index 2cbfa26..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementButtonIcon.java +++ /dev/null @@ -1,38 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.util.Icon; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementButtonIcon extends ElementButton -{ - Icon icon; - - public ElementButtonIcon(IGuiBase parent, int x, int y, String id, Icon icon) - { - super(parent, x, y, 20, id, null); - this.icon = icon; - } - - public ElementButtonIcon(IGuiBase parent, int x, int y, String id, String hover, Icon icon) - { - super(parent, x, y, 20, id, null, hover); - this.icon = icon; - } - - @Override - public void draw() - { - super.draw(); - - if (texture != null) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - GuiUtils.drawIcon(gui, icon, posX + sizeX / 2 - 8, posY + sizeY / 2 - 8, 1); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementCrafting.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementCrafting.java deleted file mode 100644 index 2ffd720..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementCrafting.java +++ /dev/null @@ -1,136 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.item.ItemStack; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementCrafting extends ElementBaseContainer -{ - int type; - - /** - * - * @param parent - * @param x - * @param y - * @param t - * 0 = 3x3 Crafting Grid, 1 = Furnace, 2 = Potion - */ - public ElementCrafting(IGuiBase parent, int x, int y, int t) - { - super(parent, x, y, t == 0 ? 18 : t == 1 ? 54 : 64, t == 2 ? 55 : 54); - type = t; - - if (t == 0) - { - for (int i = 0; i < 9; i++) - { - int xPos = i % 3 * 18, yPos = i / 3 * 18; - elements.add(new ElementItemIconWithSlot(parent, xPos, yPos, null)); - } - - elements.add(new ElementIcon(parent, 61, 19, 2)); - elements.add(new ElementItemIconWithSlotAndCount(parent, 90, 14, null, true)); - elements.get(elements.size() - 2).setVisible(false); - elements.get(elements.size() - 1).setVisible(false); - } - else if (t == 1) - { - elements.add(new ElementItemIconWithSlot(parent, 0, 0, null)); - elements.add(new ElementFire(parent, 2, 21, 0, 1000, false)); - elements.add(new ElementItemIconWithSlot(parent, 0, 36, null)); - - elements.add(new ElementIcon(parent, 25, 19, 2)); - elements.add(new ElementItemIconWithSlotAndCount(parent, 56, 13, null, true)); - elements.get(elements.size() - 2).setVisible(false); - elements.get(elements.size() - 1).setVisible(false); - } - else if (t == 2) - { - elements.add(new ElementItemIcon(parent, 24, 2, null)); - elements.add(new ElementItemIcon(parent, 1, 31, null)); - elements.add(new ElementItemIcon(parent, 24, 38, null)); - elements.add(new ElementItemIcon(parent, 47, 31, null)); - elements.add(new ElementBubbles(parent, 10, 0, 100)); - elements.add(new ElementDownArrow(parent, 43, 2, 1000)); - } - } - - public ElementCrafting addAllGridSlots(ItemStack[] stacks) - { - if (type == 0) - { - for (int i = 0; i < stacks.length; i++) - { - ((ElementItemIconWithSlot) elements.get(i)).setItem(stacks[i]); - } - } - - return this; - } - - public ElementCrafting addBothFurnaceSlots(ItemStack[] stacks) - { - if (type == 1) - { - ((ElementItemIconWithSlot) elements.get(0)).setItem(stacks[0]); - ((ElementItemIconWithSlot) elements.get(2)).setItem(stacks[1]); - } - - return this; - } - - public ElementCrafting addOutputSlot(ItemStack stack) - { - if (type == 2) - { - ((ElementItemIcon) elements.get(1)).setItem(stack); - ((ElementItemIcon) elements.get(2)).setItem(stack); - ((ElementItemIcon) elements.get(3)).setItem(stack); - } - else - { - sizeX = type == 1 ? 82 : 116; - elements.get(elements.size() - 2).setVisible(true); - elements.get(elements.size() - 1).setVisible(true); - ((ElementItemIconWithSlotAndCount) elements.get(elements.size() - 1)).setItem(stack); - } - - return this; - } - - public ElementCrafting addPotionIngredient(ItemStack stack) - { - if (type == 2) - { - ((ElementItemIcon) elements.get(0)).setItem(stack); - } - - return this; - } - - public ElementCrafting addTopFurnaceSlot(ItemStack stack) - { - if (type == 1) - { - ((ElementItemIconWithSlot) elements.get(0)).setItem(stack); - } - - return this; - } - - @Override - public void draw() - { - if (type == 2) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 146, 0, sizeX, sizeY); - } - - super.draw(); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementDownArrow.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementDownArrow.java deleted file mode 100644 index 78abcc4..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementDownArrow.java +++ /dev/null @@ -1,59 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementDownArrow extends ElementProgressBar -{ - boolean showTooltip; - - public ElementDownArrow(IGuiBase parent, int x, int y) - { - this(parent, x, y, 0, 100, false); - } - - public ElementDownArrow(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max, false); - } - - public ElementDownArrow(IGuiBase parent, int x, int y, int progress, int max, boolean tooltip) - { - super(parent, x, y, progress, max); - sizeX = 8; - sizeY = 27; - showTooltip = tooltip; - } - - @Override - public void addTooltip(List list) - { - if (showTooltip) - { - super.addTooltip(list); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 0, 26, sizeX, sizeY); - - if (!isDisabled()) - { - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - } - - drawTexturedModalRect(posX, posY, sizeX, 26, sizeX, height); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFakeItemSlot.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFakeItemSlot.java deleted file mode 100644 index 00cd8c8..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFakeItemSlot.java +++ /dev/null @@ -1,63 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.client.gui.Gui; -import net.minecraft.item.ItemStack; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementFakeItemSlot extends ElementItemIconWithSlot -{ - public ElementFakeItemSlot(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, stack); - } - - public ElementFakeItemSlot(IGuiBase parent, int x, int y, ItemStack stack, boolean big) - { - super(parent, x, y, stack, big); - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, sizeX == 18 ? 0 : 18, 0, sizeX, sizeY); - - int buffer = sizeX == 18 ? 1 : 5; - GuiUtils.drawItemStack(gui, item, posX + buffer, posY + buffer); - - if (intersectsWith(gui.getMouseX(), gui.getMouseY()) && !isDisabled()) - { - Gui.drawRect(posX + 1, posY + 1, posX + sizeX - 1, posY + sizeY - 1, 0x88FFFFFF); - } - - if (isDisabled()) - { - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX + 1, posY + 1, 15, 54, 16, 16); - } - } - - public ItemStack getStack() - { - return item; - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - if (!isDisabled() && gui.isItemStackAllowedInFakeSlot(this, gui.getMinecraft().thePlayer.inventory.getItemStack())) - { - item = gui.getMinecraft().thePlayer.inventory.getItemStack(); - gui.handleElementFakeSlotItemChange(this); - } - - return true; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFire.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFire.java deleted file mode 100644 index d0627f1..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFire.java +++ /dev/null @@ -1,62 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementFire extends ElementProgressBar -{ - boolean showTooltip; - - public ElementFire(IGuiBase parent, int x, int y) - { - this(parent, x, y, 0, 100, false); - } - - public ElementFire(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max, false); - } - - public ElementFire(IGuiBase parent, int x, int y, int progress, int max, boolean tooltip) - { - super(parent, x, y, progress, max); - sizeX = 14; - sizeY = 14; - showTooltip = tooltip; - } - - @Override - public void addTooltip(List list) - { - if (showTooltip) - { - super.addTooltip(list); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 88, 0, sizeX, sizeY); - - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - height = height == 14 ? 13 : height; - } - - drawTexturedModalRect(posX, posY + height, 88 + sizeX, height, sizeX, sizeY - height); - - if (isDisabled()) - { - drawTexturedModalRect(posX, posY, 0, 53, 15, 15); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFluidTank.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFluidTank.java deleted file mode 100644 index 0ee3a89..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementFluidTank.java +++ /dev/null @@ -1,95 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.Icon; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementFluidTank extends ElementProgressBar -{ - byte scale; - Fluid fluid; - - public ElementFluidTank(IGuiBase parent, int x, int y, int progress, int max, Fluid f, int scale) - { - super(parent, x, y, progress, max); - sizeX = 18; - sizeY = 62; - this.scale = (byte) scale; - fluid = f; - } - - @Override - public void addTooltip(List list) - { - super.addTooltip(list); - list.set(0, list.get(0) + " mB"); - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 210, 0, sizeX, sizeY); - - if (!isDisabled() && fluid != null) - { - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - height = Math.min(height, sizeY - 2); - } - - Icon icon = fluid.getIcon(); - int colour = fluid.getColor(); - gui.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); - GL11.glColor3ub((byte) (colour >> 16 & 0xFF), (byte) (colour >> 8 & 0xFF), (byte) (colour & 0xFF)); - - for (int i = 0; i < height; i += 16) - { - GuiUtils.drawScaledTexturedModelRectFromIcon(gui, posX + 1, posY + sizeY - height - 1 + i, icon, 16, Math.min(height - i, 16)); - } - } - - if (scale != 0) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX + 1, posY + (scale == 1 ? 6 : 14), scale == 1 ? 228 : 210, scale == 1 ? 42 : 62, sizeX, sizeY); - } - } - - public void setFluid(Fluid f) - { - if (fluid == null) - { - currentProgress = 0; - } - - fluid = f; - } - - public void setFluid(FluidStack stack) - { - if (stack == null) - { - fluid = null; - currentProgress = 0; - } - else - { - fluid = stack.getFluid(); - currentProgress = stack.amount; - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementIcon.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementIcon.java deleted file mode 100644 index 573ab00..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementIcon.java +++ /dev/null @@ -1,58 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementIcon extends ElementBase -{ - int texU, texV; - - public ElementIcon(IGuiBase parent, int x, int y, int icon) - { - super(parent, x, y, 0, 0); - - switch (icon) - { - default: - case 0: - sizeX = sizeY = 18; - break; - - case 1: - texU = 18; - sizeX = sizeY = 26; - break; - - case 2: - texU = 44; - sizeX = 22; - sizeY = 15; - break; - - case 3: - texU = 88; - sizeX = 14; - sizeY = 13; - break; - - case 4: - texU = 116; - sizeX = sizeY = 13; - break; - - case 5: - texV = 53; - sizeX = sizeY = 15; - break; - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, texU, texV, sizeX, sizeY); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIcon.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIcon.java deleted file mode 100644 index 3736bf6..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIcon.java +++ /dev/null @@ -1,58 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementItemIcon extends ElementBase -{ - ItemStack item; - - public ElementItemIcon(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, 16, 16); - item = stack; - } - - @SuppressWarnings("unchecked") - @Override - public void addTooltip(List list) - { - if (item != null) - { - List stringList = item.getTooltip(Minecraft.getMinecraft().thePlayer, false); - - for (int k = 0; k < stringList.size(); ++k) - { - if (k == 0) - { - stringList.set(k, "\u00a7" + Integer.toHexString(item.getRarity().rarityColor) + stringList.get(k)); - } - else - { - stringList.set(k, EnumChatFormatting.GRAY + stringList.get(k)); - } - } - - for (String s : stringList) // Otherwise we're creating a new list - not adding to the existing one - { - list.add(s); - } - } - } - - @Override - public void draw() - { - GuiUtils.drawItemStack(gui, item, posX, posY); - } - - public void setItem(ItemStack stack) - { - item = stack; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithCount.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithCount.java deleted file mode 100644 index 5c878a5..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithCount.java +++ /dev/null @@ -1,19 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.item.ItemStack; -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementItemIconWithCount extends ElementItemIcon -{ - public ElementItemIconWithCount(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, stack); - } - - @Override - public void draw() - { - super.draw(); - gui.getItemRenderer().renderItemOverlayIntoGUI(gui.getFontRenderer(), gui.getTextureManager(), item, posX, posY, item.stackSize > 999 ? "+" : null); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlot.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlot.java deleted file mode 100644 index 8646d04..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlot.java +++ /dev/null @@ -1,34 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.item.ItemStack; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementItemIconWithSlot extends ElementItemIcon -{ - public ElementItemIconWithSlot(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, stack); - sizeX = sizeY = 18; - } - - public ElementItemIconWithSlot(IGuiBase parent, int x, int y, ItemStack stack, boolean big) - { - super(parent, x, y, stack); - sizeX = sizeY = big ? 26 : 18; - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, sizeX == 18 ? 0 : 18, 0, sizeX, sizeY); - - int buffer = sizeX == 18 ? 1 : 5; - GuiUtils.drawItemStack(gui, item, posX + buffer, posY + buffer); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlotAndCount.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlotAndCount.java deleted file mode 100644 index 7d3a3d4..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemIconWithSlotAndCount.java +++ /dev/null @@ -1,35 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.item.ItemStack; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; -import tppitweaks.client.gui.library.gui.utils.GuiUtils; - -public class ElementItemIconWithSlotAndCount extends ElementItemIcon -{ - public ElementItemIconWithSlotAndCount(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, stack); - sizeX = sizeY = 18; - } - - public ElementItemIconWithSlotAndCount(IGuiBase parent, int x, int y, ItemStack stack, boolean big) - { - super(parent, x, y, stack); - sizeX = sizeY = big ? 26 : 18; - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, sizeX == 18 ? 0 : 18, 0, sizeX, sizeY); - - int buffer = sizeX == 18 ? 1 : 5; - GuiUtils.drawItemStack(gui, item, posX + buffer, posY + buffer); - gui.getItemRenderer().renderItemOverlayIntoGUI(gui.getFontRenderer(), gui.getTextureManager(), item, posX + buffer, posY + buffer, item.stackSize > 999 ? "+" : null); - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemStackPanel.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemStackPanel.java deleted file mode 100644 index 1a63439..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemStackPanel.java +++ /dev/null @@ -1,59 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementItemStackPanel extends ElementBaseContainer -{ - int lastX = 0, lastY = 0, highestRow = 0; - - public ElementItemStackPanel(IGuiBase parent, int x, int y, int w, int h) - { - super(parent, x, y, w, h); - } - - @Override - public ElementBaseContainer addElement(ElementBase element) - { - if (lastX + element.getWidth() < sizeX) - { - if (element.getHeight() > highestRow) - { - highestRow = element.getHeight(); - } - - element.setPosition(lastX, lastY); - lastX += element.getWidth() + 4; - } - else - { - lastX = 0; - lastY += highestRow + 4; - element.setPosition(lastX, lastY); - lastX += element.getWidth() + 4; - highestRow = element.getHeight(); - } - - return super.addElement(element); - } - - @Override - public void addTooltip(List list) - { - for (ElementBase element : elements) - { - if (element.intersectsWith(gui.getMouseX(), gui.getMouseY())) - { - element.addTooltip(list); - ElementItemIconWithCount el = (ElementItemIconWithCount) element; - - if (!list.isEmpty() && el.item.stackSize > 1) - { - list.set(0, el.item.stackSize + "x " + list.get(0)); - return; - } - } - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemText.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemText.java deleted file mode 100644 index 0c0730a..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementItemText.java +++ /dev/null @@ -1,52 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementItemText extends ElementText -{ - ItemStack item; - - public ElementItemText(IGuiBase parent, int x, int y, ItemStack stack) - { - super(parent, x, y, stack.getDisplayName(), ""); - item = stack; - } - - public ElementItemText(IGuiBase parent, int x, int y, ItemStack stack, int c, boolean s) - { - super(parent, x, y, stack.getDisplayName(), "", c, s); - item = stack; - } - - @SuppressWarnings("unchecked") - @Override - public void addTooltip(List list) - { - if (item != null) - { - List stringList = item.getTooltip(Minecraft.getMinecraft().thePlayer, false); - - for (int k = 0; k < stringList.size(); ++k) - { - if (k == 0) - { - stringList.set(k, "\u00a7" + Integer.toHexString(item.getRarity().rarityColor) + stringList.get(k)); - } - else - { - stringList.set(k, EnumChatFormatting.GRAY + stringList.get(k)); - } - } - - for (String s : stringList) // Otherwise we're creating a new list - not adding to the existing one - { - list.add(s); - } - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementPlus.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementPlus.java deleted file mode 100644 index f2c9eaf..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementPlus.java +++ /dev/null @@ -1,76 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementPlus extends ElementProgressBar -{ - boolean showTooltip, horizontal; - - public ElementPlus(IGuiBase parent, int x, int y) - { - this(parent, x, y, 0, 100, false, false); - } - - public ElementPlus(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max, false, false); - } - - public ElementPlus(IGuiBase parent, int x, int y, int progress, int max, boolean tooltip, boolean horiz) - { - super(parent, x, y, progress, max); - sizeX = 13; - sizeY = 13; - showTooltip = tooltip; - horizontal = horiz; - } - - @Override - public void addTooltip(List list) - { - if (showTooltip) - { - super.addTooltip(list); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 116, 0, sizeX, sizeY); - - if (horizontal) - { - int width = 0; - - if (currentProgress > 0) - { - width = Math.round((float) currentProgress * sizeX / maxProgress); - } - - drawTexturedModalRect(posX, posY, 116 + sizeX, 0, width, sizeY); - } - else - { - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - } - - drawTexturedModalRect(posX, posY + sizeY - height, 116 + sizeX, sizeY - height, sizeX, height); - } - - if (isDisabled()) - { - drawTexturedModalRect(posX - 1, posY - 1, 0, 53, 15, 15); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementProgressBar.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementProgressBar.java deleted file mode 100644 index 3dde56e..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementProgressBar.java +++ /dev/null @@ -1,115 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementProgressBar extends ElementBase -{ - protected int currentProgress, maxProgress, autoIncrement; - - public ElementProgressBar(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max); - } - - public ElementProgressBar(IGuiBase parent, int x, int y, int progress, int max) - { - super(parent, x, y, 42, 4); - currentProgress = progress; - maxProgress = max; - } - - @Override - public void addTooltip(List list) - { - list.add(currentProgress + " / " + maxProgress); - } - - public ElementProgressBar decrementProgress(int progress) - { - if (!isDisabled()) - { - currentProgress -= progress; - } - - return this; - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 44, 18, sizeX, sizeY); - - int width = 0; - - if (currentProgress > 0) - { - width = Math.round((float) currentProgress * sizeX / maxProgress); - } - - drawTexturedModalRect(posX, posY, 44, 18 + 4, width, sizeY); - } - - public int getMaximum() - { - return maxProgress; - } - - public int getProgress() - { - return currentProgress; - } - - public ElementProgressBar incrementProgress(int progress) - { - if (!isDisabled()) - { - currentProgress += progress; - } - - return this; - } - - public ElementProgressBar setAutoIncrement(int amount) - { - autoIncrement = amount; - - return this; - } - - public ElementProgressBar setMaximum(int max) - { - maxProgress = max; - - return this; - } - - public ElementProgressBar setProgress(int progress) - { - if (!isDisabled()) - { - currentProgress = progress; - } - - return this; - } - - @Override - public void update() - { - if (autoIncrement > 0) - { - incrementProgress(autoIncrement); - - if (currentProgress > maxProgress) - { - setProgress(0); - } - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRedstoneFlux.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRedstoneFlux.java deleted file mode 100644 index 7cd25f0..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRedstoneFlux.java +++ /dev/null @@ -1,50 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementRedstoneFlux extends ElementProgressBar -{ - public ElementRedstoneFlux(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max); - } - - public ElementRedstoneFlux(IGuiBase parent, int x, int y, int progress, int max) - { - super(parent, x, y, progress, max); - sizeX = 14; - sizeY = 42; - } - - @Override - public void addTooltip(List list) - { - super.addTooltip(list); - - list.set(0, list.get(0) + " RF"); - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 228, 0, sizeX, sizeY); - - if (!isDisabled()) - { - int height = 0; - - if (currentProgress > 0) - { - height = Math.round((float) currentProgress * sizeY / maxProgress); - } - - drawTexturedModalRect(posX, posY + sizeY - height, 228 + sizeX, sizeY - height, sizeX, height); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRightArrow.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRightArrow.java deleted file mode 100644 index 53e5f14..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementRightArrow.java +++ /dev/null @@ -1,61 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementRightArrow extends ElementProgressBar -{ - boolean showTooltip; - - public ElementRightArrow(IGuiBase parent, int x, int y) - { - this(parent, x, y, 0, 100, false); - } - - public ElementRightArrow(IGuiBase parent, int x, int y, int max) - { - this(parent, x, y, 0, max, false); - } - - public ElementRightArrow(IGuiBase parent, int x, int y, int progress, int max, boolean tooltip) - { - super(parent, x, y, progress, max); - sizeX = 22; - sizeY = 15; - showTooltip = tooltip; - } - - @Override - public void addTooltip(List list) - { - if (showTooltip) - { - super.addTooltip(list); - } - } - - @Override - public void draw() - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(texture); - drawTexturedModalRect(posX, posY, 44, 0, sizeX, sizeY); - - int width = 0; - - if (currentProgress > 0) - { - width = Math.round((float) currentProgress * sizeX / maxProgress); - } - - drawTexturedModalRect(posX, posY, 44 + sizeX, 0, width, sizeY); - - if (isDisabled()) - { - drawTexturedModalRect(posX + 3, posY, 0, 53, 15, 15); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollBar.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollBar.java deleted file mode 100644 index a4599b4..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollBar.java +++ /dev/null @@ -1,109 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.client.gui.Gui; - -import org.lwjgl.input.Mouse; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementScrollBar extends ElementBase -{ - ElementScrollPanel panel; - int barSize; - boolean isMouseButtonDown; - float scroll, oldMouse; - - public ElementScrollBar(IGuiBase parent, int x, int y, int w, int h, ElementScrollPanel scroll) - { - super(parent, x, y, w, h); - panel = scroll; - } - - @Override - public void draw() - { - int scr = Math.min(sizeY - barSize - 1, (int) scroll); - Gui.drawRect(posX, posY, posX + sizeX, posY + sizeY - 1, 0x33000000); - Gui.drawRect(posX, posY + scr, posX + sizeX, posY + scr + barSize, 0x77000000); - } - - @Override - public boolean isDisabled() - { - disabled = panel.isDisabled(); - return super.isDisabled(); - } - - @Override - public boolean isVisible() - { - visible = panel.isVisible(); - return super.isVisible(); - } - - @Override - public void update() - { - barSize = (int) ((float) panel.sizeY / (float) panel.contentHeight * sizeY); - - if (barSize >= sizeY) - { - barSize = 0; - } - - if (panel.contentHeight < panel.sizeY || !isVisible() || isDisabled()) - { - return; - } - - if (Mouse.isButtonDown(0)) - { - if (intersectsWith(gui.getMouseX(), gui.getMouseY())) - { - if (gui.getMouseY() + gui.getGuiTop() > posY + (int) scroll && gui.getMouseY() + gui.getGuiTop() < posY + (int) scroll + barSize) - { - isMouseButtonDown = true; - } - } - - if (isMouseButtonDown) - { - scroll += gui.getMouseY() - oldMouse; - - if (scroll < 0) - { - scroll = 0; - } - - if (scroll > sizeY - barSize) - { - scroll = sizeY - barSize; - } - - panel.scrollY = -(scroll / sizeY * panel.contentHeight); - } - } - else - { - scroll = -panel.scrollY / panel.contentHeight * sizeY; - isMouseButtonDown = false; - } - - if (!isMouseButtonDown) - { - scroll = -panel.scrollY / panel.contentHeight * sizeY; - } - - oldMouse = gui.getMouseY(); - - if (scroll < 0) - { - scroll = 0; - } - - if (scroll > sizeY - barSize) - { - scroll = sizeY - barSize; - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanel.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanel.java deleted file mode 100644 index 04182dd..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanel.java +++ /dev/null @@ -1,199 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementScrollPanel extends ElementBaseContainer -{ - protected float scrollX, scrollY; - protected int contentHeight, contentWidth, oldMouseX, oldMouseY; - protected boolean isMouseButtonDown = false; - - public ElementScrollPanel(IGuiBase parent, int x, int y, int w, int h) - { - super(parent, x, y, w, h); - scrollX = scrollY = 0; - } - - @Override - public ElementScrollPanel addElement(ElementBase element) - { - super.addElement(element); - - if (element.getRelativeY() + element.getHeight() > contentHeight) - { - contentHeight = element.getRelativeY() + element.getHeight(); - } - - if (element.getRelativeX() + element.getWidth() > contentWidth) - { - contentWidth = element.getRelativeX() + element.getWidth(); - } - - return this; - } - - @Override - public void addTooltip(List list) - { - for (ElementBase element : elements) - { - if (element.isVisible() && element.intersectsWith(gui.getMouseX(), gui.getMouseY()) && isElementVisible(element)) - { - element.addTooltip(list); - - if (!list.isEmpty()) - { - return; - } - } - } - } - - @Override - public void clear() - { - super.clear(); - contentHeight = 0; - contentWidth = 0; - scrollX = scrollY = 0f; - } - - @Override - public void draw() - { - for (ElementBase element : elements) - { - int x = posX + (int) scrollX + element.getRelativeX(), y = posY + (int) scrollY + element.getRelativeY(); - - if (element.isVisible() && isElementVisible(element)) - { - element.draw(x, y); - } - } - - GL11.glDisable(GL11.GL_DEPTH_TEST); // Stops blocks from being rendered above GUI elements that are rendered afterwards - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - for (ElementBase element : elements) - { - if (element.isVisible() && element.intersectsWith(x, y)) - { - if (element.handleMouseClicked(x, y, mouseButton)) - { - return true; - } - } - } - - return false; - } - - public boolean isCoordinateVisible(int x, int y) - { - return x > posX + gui.getGuiLeft() && x < posX + sizeX + gui.getGuiLeft() && y > posY + gui.getGuiTop() && y < posY + sizeY + gui.getGuiTop(); - } - - public boolean isElementVisible(ElementBase element) - { - int x = posX + (int) scrollX + element.getRelativeX(), y = posY + (int) scrollY + element.getRelativeY(); - - if (isCoordinateVisible(x + gui.getGuiLeft(), y + gui.getGuiTop())) - { - return true; - } - else if (isCoordinateVisible(x + element.getWidth() + gui.getGuiLeft(), y + element.getHeight() + gui.getGuiTop())) - { - return true; - } - - for (int i = 0; i < 3; i++) - { - int offsetWidth = element.getWidth() / 3 * i, offsetHeight = element.getHeight() / 3 * i; - - if (isCoordinateVisible(x + offsetWidth + gui.getGuiLeft(), y + offsetHeight + gui.getGuiTop())) - { - return true; - } - } - - return false; - } - - @Override - public void update() - { - if (!isVisible() || isDisabled()) - { - return; - } - - for (ElementBase element : elements) - { - element.update(); - } - - int mouseX = gui.getMouseX() + gui.getGuiLeft(), mouseY = gui.getMouseY() + gui.getGuiTop(); - - if (Mouse.isButtonDown(0)) - { - if (mouseX >= posX && mouseX <= posX + sizeX && mouseY >= posY && mouseY <= posY + sizeY) - { - if (isMouseButtonDown) - { - scrollX += mouseX - oldMouseX; - scrollY += mouseY - oldMouseY; - } - else - { - isMouseButtonDown = true; - } - } - - oldMouseX = mouseX; - oldMouseY = mouseY; - } - else - { - isMouseButtonDown = false; - - int wheel = Mouse.getDWheel(); - scrollY -= wheel == 0 ? 0 : wheel > 0 ? -10 : 10; - } - - if (scrollX > 0) - { - scrollX = 0; - } - - if (scrollY > 0) - { - scrollY = 0; - } - - if (contentWidth < sizeX) - { - scrollX = 0; - } - else if (scrollX < -contentWidth + sizeX) - { - scrollX = -contentWidth + sizeX; - } - - if (contentHeight < sizeY) - { - scrollY = 0; - } - else if (scrollY < -contentHeight + sizeY) - { - scrollY = -contentHeight + sizeY; - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanelOverlay.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanelOverlay.java deleted file mode 100644 index e963449..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementScrollPanelOverlay.java +++ /dev/null @@ -1,60 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementScrollPanelOverlay extends ElementScrollPanel -{ - ResourceLocation overlayTexture; - int paddingSize; - boolean top = true, bottom = true, left = true, right = true; - - public ElementScrollPanelOverlay(IGuiBase parent, int x, int y, int w, int h, ResourceLocation tex, int padding) - { - super(parent, x, y, w, h); - overlayTexture = tex; - paddingSize = padding; - } - - @Override - public void draw() - { - super.draw(); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - gui.getTextureManager().bindTexture(overlayTexture); - - if (top) - { - drawTexturedModalRect(posX, posY - paddingSize, relativePosX, relativePosY - paddingSize, sizeX, paddingSize); - } - - if (bottom) - { - drawTexturedModalRect(posX, posY + sizeY, relativePosX, relativePosY + sizeY, sizeX, paddingSize); - } - - if (left) - { - drawTexturedModalRect(posX - paddingSize, posY, relativePosX - paddingSize, relativePosY, paddingSize, sizeY); - } - - if (right) - { - drawTexturedModalRect(posX + sizeX, posY, relativePosX + sizeX, relativePosY, paddingSize, sizeY); - } - } - - public ElementScrollPanelOverlay setSides(boolean t, boolean b, boolean l, boolean r) - { - top = t; - bottom = b; - left = l; - right = r; - - return this; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementText.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementText.java deleted file mode 100644 index 9a4669d..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementText.java +++ /dev/null @@ -1,48 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementText extends ElementBase -{ - int colour; - String displayText, hoverText; - boolean shadow; - - public ElementText(IGuiBase parent, int x, int y, String text, String hover) - { - this(parent, x, y, text, hover, 0x404040, false); - } - - public ElementText(IGuiBase parent, int x, int y, String text, String hover, int c, boolean s) - { - super(parent, x, y, parent.getFontRenderer().getStringWidth(text), parent.getFontRenderer().FONT_HEIGHT); - displayText = text; - hoverText = hover; - colour = c; - shadow = s; - } - - @Override - public void addTooltip(List list) - { - if (hoverText != null) - { - list.add(hoverText); - } - } - - @Override - public void draw() - { - if (shadow) - { - gui.getFontRenderer().drawStringWithShadow(displayText, posX, posY, colour); - } - else - { - gui.getFontRenderer().drawString(displayText, posX, posY, colour); - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextBox.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextBox.java deleted file mode 100644 index 6076e1f..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextBox.java +++ /dev/null @@ -1,45 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import java.util.List; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class ElementTextBox extends ElementText -{ - List textStrings; - - public ElementTextBox(IGuiBase parent, int x, int y, String text, int width) - { - this(parent, x, y, text, width, 0x404040, false); - } - - @SuppressWarnings("unchecked") - public ElementTextBox(IGuiBase parent, int x, int y, String text, int width, int c, boolean s) - { - super(parent, x, y, text, null, c, s); - - textStrings = parent.getFontRenderer().listFormattedStringToWidth(text, width); - sizeX = width; - sizeY = textStrings.size() * parent.getFontRenderer().FONT_HEIGHT; - } - - @Override - public void draw() - { - int y = 0; - - for (String s : textStrings) - { - if (shadow) - { - gui.getFontRenderer().drawStringWithShadow(s, posX, posY + y, colour); - } - else - { - gui.getFontRenderer().drawString(s, posX, posY + y, colour); - } - - y += gui.getFontRenderer().FONT_HEIGHT; - } - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextClickable.java b/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextClickable.java deleted file mode 100644 index 8f45f43..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/element/ElementTextClickable.java +++ /dev/null @@ -1,33 +0,0 @@ -package tppitweaks.client.gui.library.gui.element; - -import tppitweaks.client.gui.library.gui.GuiBase; -import tppitweaks.client.gui.modGuides.GuiGuideBase; - -public class ElementTextClickable extends ElementText -{ - private String modid; - - public ElementTextClickable(GuiBase gui, int x, int y, String displayText, String tooltip, int color, String modid) - { - super(gui, x, y, displayText, tooltip, color, false); - - this.modid = modid; - } - - @Override - public boolean handleMouseClicked(int x, int y, int mouseButton) - { - ((GuiGuideBase) this.gui).displayModInfo(modid); - return true; - } - - @Override - public void draw() - { - if (intersectsWith(gui.getMouseX(), gui.getMouseY())) - this.colour = 0x505050; - else - this.colour = 0x282828; - super.draw(); - } -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/client/gui/library/gui/utils/ComparableItemStack.java b/src/main/java/tppitweaks/client/gui/library/gui/utils/ComparableItemStack.java deleted file mode 100644 index 0c1b19a..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/utils/ComparableItemStack.java +++ /dev/null @@ -1,161 +0,0 @@ -package tppitweaks.client.gui.library.gui.utils; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -/** - * This class allows for OreDictionary-compatible ItemStack comparisons. - * - * The intended purpose of this is for things such as Recipe Handlers or HashMaps of ItemStacks. - * - * @author King Lemming - * - */ -public class ComparableItemStack -{ - - public int itemID = -1; - public int metadata = -1; - public int stackSize = -1; - public int oreID = -1; - - public ComparableItemStack(ComparableItemStack stack) - { - - itemID = stack.itemID; - metadata = stack.metadata; - stackSize = stack.stackSize; - oreID = stack.oreID; - } - - public ComparableItemStack(int itemID, int damage, int stackSize) - { - - this.itemID = itemID; - metadata = damage; - this.stackSize = stackSize; - oreID = OreDictionary.getOreID(toItemStack()); - } - - public ComparableItemStack(ItemStack stack) - { - - if (stack != null) - { - itemID = stack.itemID; - metadata = stack.getItemDamage(); - stackSize = stack.stackSize; - oreID = OreDictionary.getOreID(stack); - } - } - - public ComparableItemStack(String oreName) - { - - if (!OreDictionary.getOres(oreName).isEmpty()) - { - ItemStack ore = OreDictionary.getOres(oreName).get(0); - itemID = ore.itemID; - metadata = ore.getItemDamage(); - stackSize = 1; - oreID = OreDictionary.getOreID(oreName); - } - } - - @Override - public ComparableItemStack clone() - { - - return new ComparableItemStack(this); - } - - @Override - public boolean equals(Object o) - { - - if (!(o instanceof ComparableItemStack)) - { - return false; - } - return isItemEqual((ComparableItemStack) o); - } - - public Item getItem() - { - - return itemID < 0 || itemID >= 32000 ? null : Item.itemsList[itemID]; - } - - @Override - public int hashCode() - { - - return oreID != -1 ? oreID : metadata | itemID << 16; - } - - public boolean isItemEqual(ComparableItemStack other) - { - - return other != null && (oreID != -1 && oreID == other.oreID || itemID == other.itemID && metadata == other.metadata); - } - - public boolean isStackEqual(ComparableItemStack other) - { - - return isItemEqual(other) && stackSize == other.stackSize; - } - - public boolean isStackValid() - { - - return getItem() != null; - } - - public ComparableItemStack set(ComparableItemStack stack) - { - - if (stack != null) - { - itemID = stack.itemID; - metadata = stack.metadata; - stackSize = stack.stackSize; - oreID = stack.oreID; - } - else - { - itemID = -1; - metadata = -1; - stackSize = -1; - oreID = -1; - } - return this; - } - - public ComparableItemStack set(ItemStack stack) - { - - if (stack != null) - { - itemID = stack.itemID; - metadata = stack.getItemDamage(); - stackSize = stack.stackSize; - oreID = OreDictionary.getOreID(stack); - } - else - { - itemID = -1; - metadata = -1; - stackSize = -1; - oreID = -1; - } - return this; - } - - public ItemStack toItemStack() - { - - return itemID < 0 || itemID >= 32000 ? null : new ItemStack(itemID, stackSize, metadata); - } - -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/utils/GuiUtils.java b/src/main/java/tppitweaks/client/gui/library/gui/utils/GuiUtils.java deleted file mode 100644 index d33abd6..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/utils/GuiUtils.java +++ /dev/null @@ -1,203 +0,0 @@ -package tppitweaks.client.gui.library.gui.utils; - -import java.util.Iterator; -import java.util.List; - -import net.minecraft.client.gui.Gui; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraftforge.fluids.FluidStack; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import tppitweaks.client.gui.library.gui.IGuiBase; - -public class GuiUtils extends Gui -{ - public static GuiUtils instance = new GuiUtils(); - - /** - * Simple method used to draw a fluid of arbitrary size. - */ - public static void drawFluid(IGuiBase gui, int x, int y, FluidStack fluid, int width, int height) - { - if (fluid == null || fluid.getFluid() == null) - { - return; - } - - gui.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); - - int colour = fluid.getFluid().getColor(fluid); - GL11.glColor3ub((byte) (colour >> 16 & 0xFF), (byte) (colour >> 8 & 0xFF), (byte) (colour & 0xFF)); - - drawTiledTexture(gui, x, y, fluid.getFluid().getIcon(fluid), width, height); - } - - public static void drawIcon(IGuiBase gui, Icon icon, int x, int y, int spriteSheet) - { - if (spriteSheet == 0) - { - gui.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); - } - else - { - gui.getTextureManager().bindTexture(TextureMap.locationItemsTexture); - } - - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); - instance.drawTexturedModelRectFromIcon(x, y, icon, 16, 16); - } - - public static void drawItemStack(IGuiBase gui, ItemStack stack, int x, int y) - { - if (stack != null) - { - RenderHelper.enableGUIStandardItemLighting(); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - gui.getItemRenderer().renderItemAndEffectIntoGUI(gui.getFontRenderer(), gui.getTextureManager(), stack, x, y); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - RenderHelper.disableStandardItemLighting(); - } - } - - public static void drawScaledTexturedModelRectFromIcon(IGuiBase gui, int x, int y, Icon icon, int width, int height) - { - if (icon == null) - { - return; - } - - double minU = icon.getMinU(); - double maxU = icon.getMaxU(); - double minV = icon.getMinV(); - double maxV = icon.getMaxV(); - - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(x + 0, y + height, gui.getZLevel(), minU, minV + (maxV - minV) * height / 16F); - tessellator.addVertexWithUV(x + width, y + height, gui.getZLevel(), minU + (maxU - minU) * width / 16F, minV + (maxV - minV) * height / 16F); - tessellator.addVertexWithUV(x + width, y + 0, gui.getZLevel(), minU + (maxU - minU) * width / 16F, minV); - tessellator.addVertexWithUV(x + 0, y + 0, gui.getZLevel(), minU, minV); - tessellator.draw(); - } - - public static void drawSizedTexturedModalRect(IGuiBase gui, int x, int y, int u, int v, int width, int height, float texW, float texH) - { - float texU = 1 / texW; - float texV = 1 / texH; - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(x + 0, y + height, gui.getZLevel(), (u + 0) * texU, (v + height) * texV); - tessellator.addVertexWithUV(x + width, y + height, gui.getZLevel(), (u + width) * texU, (v + height) * texV); - tessellator.addVertexWithUV(x + width, y + 0, gui.getZLevel(), (u + width) * texU, (v + 0) * texV); - tessellator.addVertexWithUV(x + 0, y + 0, gui.getZLevel(), (u + 0) * texU, (v + 0) * texV); - tessellator.draw(); - } - - public static void drawTiledTexture(IGuiBase gui, int x, int y, Icon icon, int width, int height) - { - int i = 0; - int j = 0; - - int drawHeight = 0; - int drawWidth = 0; - - for (i = 0; i < width; i += 16) - { - for (j = 0; j < height; j += 16) - { - drawWidth = Math.min(width - i, 16); - drawHeight = Math.min(height - j, 16); - drawScaledTexturedModelRectFromIcon(gui, x + i, y + j, icon, drawWidth, drawHeight); - } - } - - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); - } - - public static void drawTooltipHoveringText(IGuiBase gui, List list, int x, int y) - { - if (list == null || list.isEmpty()) - { - return; - } - - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - - int k = 0; - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) - { - String s = iterator.next(); - int l = gui.getFontRenderer().getStringWidth(s); - - if (l > k) - { - k = l; - } - } - - int i1 = x + 12; - int j1 = y - 12; - int k1 = 8; - - if (list.size() > 1) - { - k1 += 2 + (list.size() - 1) * 10; - } - if (i1 + k > gui.getWidth()) - { - i1 -= 28 + k; - } - if (j1 + k1 + 6 > gui.getHeight()) - { - j1 = gui.getHeight() - k1 - 6; - } - - gui.setZLevel(300.0F); - gui.getItemRenderer().zLevel = 300.0F; - int l1 = -267386864; - instance.drawGradientRect(i1 - 3, j1 - 4, i1 + k + 3, j1 - 3, l1, l1); - instance.drawGradientRect(i1 - 3, j1 + k1 + 3, i1 + k + 3, j1 + k1 + 4, l1, l1); - instance.drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 + k1 + 3, l1, l1); - instance.drawGradientRect(i1 - 4, j1 - 3, i1 - 3, j1 + k1 + 3, l1, l1); - instance.drawGradientRect(i1 + k + 3, j1 - 3, i1 + k + 4, j1 + k1 + 3, l1, l1); - int i2 = 1347420415; - int j2 = (i2 & 16711422) >> 1 | i2 & -16777216; - instance.drawGradientRect(i1 - 3, j1 - 3 + 1, i1 - 3 + 1, j1 + k1 + 3 - 1, i2, j2); - instance.drawGradientRect(i1 + k + 2, j1 - 3 + 1, i1 + k + 3, j1 + k1 + 3 - 1, i2, j2); - instance.drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 - 3 + 1, i2, i2); - instance.drawGradientRect(i1 - 3, j1 + k1 + 2, i1 + k + 3, j1 + k1 + 3, j2, j2); - - for (int k2 = 0; k2 < list.size(); ++k2) - { - String s1 = list.get(k2); - gui.getFontRenderer().drawStringWithShadow(s1, i1, j1, -1); - - if (k2 == 0) - { - j1 += 2; - } - j1 += 10; - } - - gui.setZLevel(0.0F); - gui.getItemRenderer().zLevel = 0.0F; - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - } - - public static int getCenteredOffset(IGuiBase gui, String string, int xWidth) - { - return (xWidth - gui.getFontRenderer().getStringWidth(string)) / 2; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/utils/ItemHelper.java b/src/main/java/tppitweaks/client/gui/library/gui/utils/ItemHelper.java deleted file mode 100644 index 4981aef..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/utils/ItemHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -package tppitweaks.client.gui.library.gui.utils; - -import net.minecraft.item.ItemDye; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import buildcraft.api.tools.IToolWrench; -import cofh.api.energy.IEnergyContainerItem; - -public class ItemHelper -{ - static String[] dyes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite" }; - - public static int getDyeColour(ItemStack item) - { - String ore = OreDictionary.getOreName(OreDictionary.getOreID(item)); - - for (int i = 0; i < dyes.length; i++) - { - if (dyes[i].equals(ore)) - { - return ItemDye.dyeColors[i]; - } - } - - return ItemDye.dyeColors[15]; - } - - public static boolean isDye(ItemStack item) - { - String ore = OreDictionary.getOreName(OreDictionary.getOreID(item)); - return ore != null && ore.startsWith("dye"); - } - - public static boolean isEnergyContainerItem(ItemStack stack) - { - return stack != null && stack.getItem() instanceof IEnergyContainerItem; - } - - public static boolean isWrench(ItemStack stack) - { - return stack == null ? false : stack.getItem() instanceof IToolWrench; - } -} diff --git a/src/main/java/tppitweaks/client/gui/library/gui/utils/ThermalExpansionHelper.java b/src/main/java/tppitweaks/client/gui/library/gui/utils/ThermalExpansionHelper.java deleted file mode 100644 index 2ce89c1..0000000 --- a/src/main/java/tppitweaks/client/gui/library/gui/utils/ThermalExpansionHelper.java +++ /dev/null @@ -1,234 +0,0 @@ -package tppitweaks.client.gui.library.gui.utils; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; -import cpw.mods.fml.common.event.FMLInterModComms; - -public class ThermalExpansionHelper -{ - - public static void addCompressionFuel(String fluidName, int energy) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setString("fluidName", fluidName); - toSend.setInteger("energy", energy); - - FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend); - } - - public static void addCoolant(String fluidName, int energy) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setString("fluidName", fluidName); - toSend.setInteger("energy", energy); - - FMLInterModComms.sendMessage("ThermalExpansion", "Coolant", toSend); - } - - public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("output", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - output.writeToNBT(toSend.getCompoundTag("output")); - - FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend); - } - - public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) - { - - NBTTagCompound toSend = new NBTTagCompound(); - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("output", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - output.writeToNBT(toSend.getCompoundTag("output")); - FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend); - } - - public static void addMagmaticFuel(String fluidName, int energy) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setString("fluidName", fluidName); - toSend.setInteger("energy", energy); - - FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend); - } - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) - { - - addPulverizerRecipe(energy, input, primaryOutput, null, 0); - } - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) - { - - addPulverizerRecipe(energy, input, primaryOutput, secondaryOutput, 100); - } - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("primaryOutput", new NBTTagCompound()); - toSend.setCompoundTag("secondaryOutput", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput")); - secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput")); - toSend.setInteger("secondaryChance", secondaryChance); - - FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend); - } - - public static void addReactantFuel(String fluidName, int energy) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setString("fluidName", fluidName); - toSend.setInteger("energy", energy); - - FMLInterModComms.sendMessage("ThermalExpansion", "ReactantFuel", toSend); - } - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) - { - - addSawmillRecipe(energy, input, primaryOutput, null, 0); - } - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) - { - - addSawmillRecipe(energy, input, primaryOutput, secondaryOutput, 100); - } - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("primaryOutput", new NBTTagCompound()); - toSend.setCompoundTag("secondaryOutput", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput")); - secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput")); - toSend.setInteger("secondaryChance", secondaryChance); - - FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend); - } - - /** - * Use this to register an Ore TYPE as a "Blast" recipe - it will require Pyrotheum Dust to smelt. Do not add the prefix. This is an opt-in for ores which do NOT have vanilla furnace recipes. - * - * Ex: "Steel" or "ElectrumFlux", not "dustSteel" or "dustElectrumFlux" - * - * @param oreType - */ - public static void addSmelterBlastOre(String oreType) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setString("oreType", oreType); - - FMLInterModComms.sendMessage("ThermalExpansion", "SmelterBlastOreType", toSend); - } - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) - { - - addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, null, 0); - } - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput) - { - - addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, secondaryOutput, 100); - } - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("primaryInput", new NBTTagCompound()); - toSend.setCompoundTag("secondaryInput", new NBTTagCompound()); - toSend.setCompoundTag("primaryOutput", new NBTTagCompound()); - toSend.setCompoundTag("secondaryOutput", new NBTTagCompound()); - - primaryInput.writeToNBT(toSend.getCompoundTag("primaryInput")); - secondaryInput.writeToNBT(toSend.getCompoundTag("secondaryInput")); - primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput")); - secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput")); - toSend.setInteger("secondaryChance", secondaryChance); - - FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", toSend); - } - - public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("output", new NBTTagCompound()); - toSend.setCompoundTag("fluid", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - output.writeToNBT(toSend.getCompoundTag("output")); - toSend.setBoolean("reversible", reversible); - toSend.setInteger("chance", chance); - fluid.writeToNBT(toSend.getCompoundTag("fluid")); - - FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend); - } - - public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) - { - - NBTTagCompound toSend = new NBTTagCompound(); - - toSend.setInteger("energy", energy); - toSend.setCompoundTag("input", new NBTTagCompound()); - toSend.setCompoundTag("output", new NBTTagCompound()); - toSend.setCompoundTag("fluid", new NBTTagCompound()); - - input.writeToNBT(toSend.getCompoundTag("input")); - output.writeToNBT(toSend.getCompoundTag("output")); - toSend.setBoolean("reversible", reversible); - fluid.writeToNBT(toSend.getCompoundTag("fluid")); - - FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend); - } - - private ThermalExpansionHelper() - { - - } - -} diff --git a/src/main/java/tppitweaks/client/gui/modGuides/GuiGuideBase.java b/src/main/java/tppitweaks/client/gui/modGuides/GuiGuideBase.java deleted file mode 100644 index 1bc7fdf..0000000 --- a/src/main/java/tppitweaks/client/gui/modGuides/GuiGuideBase.java +++ /dev/null @@ -1,273 +0,0 @@ -package tppitweaks.client.gui.modGuides; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -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; -import tppitweaks.client.gui.library.gui.element.ElementScrollBar; -import tppitweaks.client.gui.library.gui.element.ElementScrollPanel; -import tppitweaks.client.gui.library.gui.element.ElementText; -import tppitweaks.client.gui.library.gui.element.ElementTextClickable; -import tppitweaks.command.CommandTPPI; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.util.FileLoader; -import tppitweaks.util.TxtParser; -import codechicken.nei.VisiblityData; -import codechicken.nei.api.INEIGuiHandler; -import codechicken.nei.api.TaggedInventoryArea; - -public class GuiGuideBase extends GuiBase implements INEIGuiHandler -{ - protected static Map mods = new TreeMap(); - - protected String title, body; - - protected static final int LENGTH = 180; - - protected GuideButton homeButton; - - public GuiGuideBase() - { - super(new ResourceLocation("tppitweaks", ConfigurationHandler.guideSkin == 0 ? "textures/gui/guiGuide.png" : "textures/gui/guiGuide_alt.png")); - this.xSize = 256; - this.ySize = 178; - - setDefaultText(true); - } - - public static void initMap() - { - for (String s : TxtParser.getSupportedMods(FileLoader.getSupportedModsFile())) - { - ArrayList pages = TxtParser.parseFileMods(FileLoader.getSupportedModsFile(), s); - String text = ""; - for (String page : pages) - { - page = page.replace("~", " "); - page = page.replace(" ", " "); - page = page.replace(" ", " "); - text += page + " "; - } - mods.put(s, new GuiMod(CommandTPPI.getProperName(s), text, s)); - } - } - - @Override - public void initGui() - { - super.initGui(); - initButtons(); - initPanel(); - } - - // Initializes the panel by first clearing all panels/scrollbars from the - // element list and then re-adding with updated text - protected void initPanel() - { - ElementScrollPanel panel = new ElementScrollPanel(this, (this.xSize / 6) - 3, (this.ySize / 9) + 5, this.xSize - 75, (int) (this.ySize / 1.35) + 14); - List lines = getLines(); - - int length = 0; - for (int i = 0; i < lines.size(); i++) - { - panel.addElement(new ElementText(this, 0, 3 + (length * 10), lines.get(i), null, 0x282828, false)); - length++; - - } - - ArrayList elementsNew = new ArrayList(); - - for (ElementBase e : elements) - { - if (!(e instanceof ElementScrollBar || e instanceof ElementScrollPanel)) - elementsNew.add(e); - } - - this.elements = elementsNew; - - this.addElement(panel); - this.addElement(new ElementScrollBar(this, 217, 15, 6, 139, panel)); - } - - @Override - public void drawGuiBackgroundLayer(float f, int mouseX, int mouseY) - { - super.drawGuiBackgroundLayer(f, mouseX, mouseY); - - if (texture != null) // Draw these parts of the texture again, so they overlap a portion of the scroll panel, allowing for smooth-looking scrolling - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - getMinecraft().renderEngine.bindTexture(texture); - drawTexturedModalRect(guiLeft + 35, guiTop, 35, 0, this.xSize - 75, 14); - drawTexturedModalRect(guiLeft + 35, guiTop + ySize - 24, 35, ySize - 24, this.xSize - 75, 14); - } - - homeButton.draw(); // Make sure this button is on top of the overlay - } - - private void initPanel(List lines, List modids) - { - ElementScrollPanel panel = new ElementScrollPanel(this, (this.xSize / 6) - 3, (this.ySize / 9) + 5, this.xSize - 75, (int) (this.ySize / 1.35) + 10); - - for (int i = 0; i < lines.size(); i++) - { - panel.addElement(new ElementTextClickable(this, 0, 3 + i * 10, lines.get(i), null, 0x282828, modids.get(i))); - } - - panel.addElement(new ElementText(this, 0, 3 + (lines.size() * 10), "", null)); // Adding an extra element because of the overlays & positions of the first element, stops the last element from being half visible when fully scrolled - - ArrayList elementsNew = new ArrayList(); - - for (ElementBase e : elements) - { - if (!(e instanceof ElementScrollBar || e instanceof ElementScrollPanel)) - elementsNew.add(e); - } - - this.elements = elementsNew; - - this.addElement(panel); - this.addElement(new ElementScrollBar(this, 217, 15, 6, 139, panel)); - } - - // Splits the body text into correctly sized lines based on the LENGTH - // constant - private List getLines() - { - List lines = new ArrayList(); - lines.add(title); - lines.add(""); - if (body.startsWith("<")) - { - body = "No information for this mod yet! " + "Use /tppi mods [modname] to get a link to a helpful webpage for this mod, " + "or contribute some documentation on the github!"; - } - FontRenderer render = this.mc.fontRenderer; - String[] paragraphs = body.split("\n"); - List words = new ArrayList(); - for (String ss : paragraphs) - { - words.add(ss.split(" ")); - } - String currentLine = ""; - for (String[] ss : words) - { - for (String s : ss) - { - if (s.endsWith(" ")) - { - s = s.substring(0, s.length() - 1); - } - if (render.getStringWidth(currentLine + s + " ") < this.xSize - (this.xSize - LENGTH)) - currentLine += s + " "; - else - { - lines.add(currentLine); - currentLine = s + " "; - } - } - lines.add(currentLine); - currentLine = ""; - lines.add(""); - } - return lines; - } - - // No NEI, too crowded - @Override - public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) - { - currentVisibility.showNEI = false; - return currentVisibility; - } - - private void initButtons() - { - this.addElement(new GuideButton(this, 0, 2, 20)); - this.addElement(new GuideButton(this, 1, 2, 50)); - this.addElement(new GuideButton(this, 2, 2, 80)); - this.addElement(new GuideButton(this, 3, 2, 110)); - this.addElement(new GuideButton(this, 4, 228, 20)); - this.addElement(new GuideButton(this, 5, 228, 50)); - this.addElement(new GuideButton(this, 6, 228, 80)); - this.addElement(new GuideButton(this, 7, 228, 110)); - homeButton = new GuideButton(this, 8, 114, 157); - this.addElement(homeButton); - } - - // There should be @Override here but people shadowing OUT OF DATE NEI INTERFACES screws up the build. I blame greg. - public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) - { - return true; - } - - // Sets the body/title and reinitializs the text - public void modifyGui(int buttonID) - { - if (buttonID <= 7) - - this.body = "This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. "; - this.initPanel(); - } - - public void displayModInfo(String modid) - { - this.title = mods.get(modid).title; - this.body = mods.get(modid).body; - initPanel(); - } - - public void showModRange(char start, char end) - { - List lines = new ArrayList(), modids = new ArrayList(); - - for (GuiMod m : mods.values()) - { - if (m.modid.toLowerCase().charAt(0) >= start && m.modid.toLowerCase().charAt(0) <= end) - { - lines.add(m.title); - modids.add(m.modid); - } - } - - initPanel(lines, modids); - - mods.keySet(); - } - - @Override - public int getItemSpawnSlot(GuiContainer gui, ItemStack item) - { - return -1; - } - - @Override - public List getInventoryAreas(GuiContainer gui) - { - return null; - } - - @Override - public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) - { - return false; - } - - public void setDefaultText(boolean startup) - { - title = "Main menu"; - body = "Welcome to the TPPI Documentation System, your source documentation for all mods in this pack. To start, click on a button signifying the letter the mod starts with, then click on the mod name to read the documentation related to it that we have available. To return to this menu, press the home button at any time."; - if (!startup) - initPanel(); - } -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/client/gui/modGuides/GuiMod.java b/src/main/java/tppitweaks/client/gui/modGuides/GuiMod.java deleted file mode 100644 index 90d136d..0000000 --- a/src/main/java/tppitweaks/client/gui/modGuides/GuiMod.java +++ /dev/null @@ -1,23 +0,0 @@ -package tppitweaks.client.gui.modGuides; - - -public class GuiMod extends GuiGuideBase -{ - - String modid; - - public GuiMod(String modName, String body, String modid) - { - super(); - this.title = modName; - this.body = body; - - this.modid = modid; - } - - @Override - public void drawGuiForegroundLayer(int mouseX, int mouseY) - { - super.drawGuiForegroundLayer(mouseX, mouseY); - } -} diff --git a/src/main/java/tppitweaks/command/CommandTPPI.java b/src/main/java/tppitweaks/command/CommandTPPI.java index 28695fd..3e015af 100644 --- a/src/main/java/tppitweaks/command/CommandTPPI.java +++ b/src/main/java/tppitweaks/command/CommandTPPI.java @@ -6,27 +6,18 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.logging.Level; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; -import net.minecraft.network.packet.Packet250CustomPayload; import net.minecraft.util.ChatMessageComponent; import tppitweaks.TPPITweaks; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.item.ModItems; -import tppitweaks.lib.Reference; -import tppitweaks.util.FileLoader; import tppitweaks.util.TxtParser; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; public class CommandTPPI extends CommandBase { @@ -36,19 +27,10 @@ public class CommandTPPI extends CommandBase /** First index is list, rest are mod names **/ private static ArrayList supportedModsAndList = new ArrayList(); - public static void initValidCommandArguments(InputStream file) + public static void initValidCommandArguments() { - validCommands.add("download"); - validCommands.add("mods"); validCommands.add("ores"); validCommands.add("getInvolved"); - validCommands.add("changelog"); - validCommands.add("guide"); - validCommands.add("removeBooks"); - - supportedModsAndList.add("list"); - - supportedModsAndList.addAll(TxtParser.getSupportedMods(file)); } public static void addProperNameMapping(String argName, String properName) @@ -103,16 +85,7 @@ public void processCommand(ICommandSender icommandsender, String[] astring) { if (astring.length > 0 && isValidArgument(astring[0])) { - if (astring[0].equalsIgnoreCase("download")) - { - if (!processCommandDownload(icommandsender, astring)) - TPPITweaks.logger.log(Level.SEVERE, "Invalid Player"); - } - else if (astring[0].equalsIgnoreCase("mods")) - { - processCommandMods(icommandsender, astring); - } - else if (astring[0].equalsIgnoreCase("ores")) + if (astring[0].equalsIgnoreCase("ores")) { processVanillaBookCommand("TPPI Ore Generation Guide", "OreGen.txt", icommandsender, astring); } @@ -120,19 +93,6 @@ else if (astring[0].equalsIgnoreCase("getInvolved")) { processVanillaBookCommand("Getting Involved In TPPI", "GetInvolved.txt", icommandsender, astring); } - else if (astring[0].equalsIgnoreCase("changelog")) - { - processCommandChangelog(icommandsender); - } - else if (astring[0].equalsIgnoreCase("guide")) - { - processCommandGuide(icommandsender); - } - else if (astring[0].equalsIgnoreCase("removeBooks")) - { - removeGuideBooks(icommandsender); - } - } else { @@ -151,40 +111,13 @@ else if (astring[0].equalsIgnoreCase("removeBooks")) } - private void removeGuideBooks(ICommandSender command) - { - EntityPlayer player = command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()); - 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) - { - ItemStack stack = new ItemStack(ModItems.tppiBook, 1, 2); - - if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(stack)) - command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(stack, 0); - } - private void processVanillaBookCommand(String title, String textFileName, ICommandSender command, String[] astring) { - InputStream file = TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/" + textFileName); List vanillaBookText = file == null ? new ArrayList() : TxtParser.parseFileMain(file); ItemStack book = new ItemStack(Item.writtenBook); - book.setTagInfo("author", new NBTTagString("author", ConfigurationHandler.bookAuthor)); + book.setTagInfo("author", new NBTTagString("author", "The TPPI Team")); book.setTagInfo("title", new NBTTagString("title", title)); NBTTagCompound nbttagcompound = book.getTagCompound(); @@ -202,127 +135,6 @@ private void processVanillaBookCommand(String title, String textFileName, IComma command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0); } - - private boolean processCommandMods(ICommandSender command, String[] args) - { - if (args.length == 2) - { - if (args[1].equals("list")) - { - listMods(command); - return true; - } - else if (supportedModsAndList.contains(args[1])) - { - giveModBook(args[1], command); - } - else - { - command.sendChatToPlayer(new ChatMessageComponent().addText("Valid mod names:")); - listMods(command); - } - - } - else - { - command.sendChatToPlayer(new ChatMessageComponent().addText("Proper Usage: /tppi mods ")); - command.sendChatToPlayer(new ChatMessageComponent().addText("or /tppi mods list to see valid names.")); - } - - return false; - } - - private boolean processCommandDownload(ICommandSender command, String[] args) - { - Packet250CustomPayload packet = new Packet250CustomPayload(); - - packet.channel = Reference.CHANNEL; - - byte[] bytes = { (byte) 0 }; - boolean showGui = command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()) != null; - - if (showGui) - { - packet.length = 1; - packet.data = bytes; - PacketDispatcher.sendPacketToPlayer(packet, (Player) command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName())); - return true; - } - - return false; - } - - private boolean processCommandChangelog(ICommandSender command) - { - ItemStack changelog = ModItems.tppiBook.getChangelog(); - - if (changelog == null) - return false; - - if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(changelog)) - ; - command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(changelog, 0); - - return true; - } - - private void listMods(ICommandSender icommandsender) - { - String s = ""; - String total = ""; - icommandsender.sendChatToPlayer(new ChatMessageComponent().addText("Listing mods:\n")); - for (int i = 1; i < supportedModsAndList.size(); i++) - { - s += supportedModsAndList.get(i); - if (i < supportedModsAndList.size() - 1) - s += ", "; - if (s.length() > 40) - { - total += s + "\n"; - s = ""; - } - } - - icommandsender.sendChatToPlayer(new ChatMessageComponent().addText(total)); - } - - private void giveModBook(String modName, ICommandSender command) - { - String properName = modProperNames.get(modName); - - ItemStack stack = new ItemStack(Item.writtenBook); - - stack.setTagInfo("author", new NBTTagString("author", ConfigurationHandler.bookAuthor)); - stack.setTagInfo("title", new NBTTagString("title", "Guide To " + properName)); - - NBTTagCompound nbttagcompound = stack.getTagCompound(); - NBTTagList bookPages = new NBTTagList("pages"); - - ArrayList pages; - - pages = TxtParser.parseFileMods(FileLoader.getSupportedModsFile(), modName + ", " + properName); - - if (pages.get(0).startsWith("<") && pages.get(0).endsWith("> ")) - { - command.sendChatToPlayer(new ChatMessageComponent().addText(pages.get(0).substring(1, pages.get(0).length() - 2))); - return; - } - - for (int i = 0; i < pages.size(); i++) - { - bookPages.appendTag(new NBTTagString("" + i, pages.get(i))); - } - - nbttagcompound.setTag("pages", bookPages); - - if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(stack)) - command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(stack, 0); - } - - public static String getProperName(String modid) - { - return modProperNames.get(modid); - } @Override public int compareTo(Object o) { diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 4a62c5f..3ddc984 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -6,32 +6,20 @@ import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; -import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Scanner; import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.Property.Type; import tppitweaks.TPPITweaks; -import tppitweaks.lib.Reference; -import tppitweaks.util.TxtParser; public class ConfigurationHandler { - public static HashMap am2SpawnControls = new HashMap(); - public static int bookID; + public static int materialID; public static int blockID; - public static String bookTitle; - public static String bookAuthor; - public static String changelogTitle; - public static String supportedModsName; - public static int guideSkin; - public static boolean enderChestResonant; public static boolean enderPouchNerf; public static boolean disableEnderTank; @@ -86,19 +74,11 @@ public class ConfigurationHandler public static boolean registerMagicalCropsOre; - public static boolean showDownloadGUI; public static boolean showMaricultureGui; public static boolean showIRCGui; - public static boolean doSpawnBook; - - public static boolean autoEnableTT; - + public static File cfg; - /** ArrayList of Strings, the strings are each one whole page **/ - public static List bookText; - public static List changelog; - public static String[] am2MobKeys = { "EntityHecate", "EntityDarkMage", "EntityLightMage", "EntityEarthElemental", "EntityFireElemental", "EntityWisp", "EntityWaterElemental", "EntityManaElemental", "EntityDryad", "EntityManaCreeper", "EntityDarkling" }; public static boolean allowCapes = true; @@ -116,16 +96,7 @@ public static void init(File file) } blockID = config.getBlock("tppiBlockId", 3115).getInt(); - - bookID = config.getItem("tppiBookId", 21650).getInt() - 256; materialID = config.getItem("tppiMaterialId", 21651).getInt() - 256; - - bookTitle = config.get("TPPI Guide Info", "bookTitle", "TPPI Welcome Packet", "The title of the custom spawn book", Type.STRING).getString(); - bookAuthor = config.get("TPPI Guide Info", "bookAuthor", "The TPPI Team", "The author of the custom spawn book", Type.STRING).getString(); - changelogTitle = config.get("TPPI Guide Info", "changelogTitle", "TPPI Changelog", "The title of the changelog").getString(); - supportedModsName = config.get("TPPI Guide Info", "supportedModsFilename", "SupportedMods", "The file name of the file to read the mod documentation from (used to support translation). Do not include the extension in the filename (it is .txt)").getString(); - guideSkin = config.get("TPPI Guide Info", "TPPIGuideSkin", 0, "The skin of the guide GUI/item, 0=tech, 1=scroll").getInt(); - doSpawnBook = config.get("TPPI Guide Info", "doSpawnBook", true, "Whether or not to give the player a welcome book on first spawn").getBoolean(true); enderChestResonant = config.get("Ender Storage Tweaks", "enderChestResonant", true, "EnderStorage Ender Chests require resonant strongboxes instead of ender pearls.").getBoolean(true); enderPouchNerf = config.get("Ender Storage Tweaks", "enderPouchNerf", true, "EnderStorage Ender Pouches require pyrotheum dust and liquid ender instead of blaze rods and ender pearls.").getBoolean(true); @@ -163,7 +134,6 @@ public static void init(File file) readdResinSmelting = config.get("Gregtech Tweaks", "readdResinSmelting", true, "Re-add the IC2 sticky resin to rubber smelting recipe.").getBoolean(true); doCharcoalBlockCompression = config.get("Gregtech Tweaks", "doCharcoalBlockCompression", true, "Charcoal blocks can be compressed to coal via compressor.").getBoolean(true); - showDownloadGUI = config.get("Mod Downloads", "showDownloadGUI", false, "Show the Download GUI on startup.").getBoolean(true); showMaricultureGui = config.get("Mod Loading Tweaks", "showMaricultureGUI", false, "Show the mariculture fix GUI on startup.").getBoolean(false); showIRCGui = config.get("Mod Loading Tweaks", "showIRCGui", true, "Show the IRC integration startup GUI").getBoolean(true); @@ -179,36 +149,11 @@ public static void init(File file) nerfMiner = config.get("Mekanism Tweaks", "nerfDigitalMiner", true, "Make the recipe for the digital miner a bit...ok a lot harder").getBoolean(true); disableUniversalCables = config.get("Mekanism Tweaks", "disableUniversalCables", false, "Remove the recipe for universal cables.").getBoolean(false); - autoEnableTT = config.get("Mod Loading Tweaks", "autoEnableTT", true, "Allow this mod to disable and enable Thaumic Tinkerer automatically").getBoolean(true); - - Reference.thaumcraftFilename = config.get("Mod Loading Tweaks", "Thaumcraft_filename", Reference.DEFAULT_THAUMCRAFT_FILENAME, "The filename for Thaumcraft4 to use to check for its presence").getString(); - 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", "1.0.0", "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(); allowCapes = config.get("Pack Info", "allowDevCapes", true, "Enables/Disables the visibility of dev capes. This only affects the user and does NOT have to be the same between client and server.").getBoolean(true); config.save(); } - /** - * Method that gathers the info for the book given to players on spawn - * - * @param file - * - The input stream to gather the text from - */ - public static void loadGuideText(InputStream file) - { - bookText = file == null ? new ArrayList() : TxtParser.parseFileMain(file); - } - - public static void loadChangelogText(InputStream file) - { - changelog = file == null ? new ArrayList() : TxtParser.parseFileMain(file); - } - /** * Sets a config value manually by editing the text file * @param prefix - The prefix of the config option (anything before '='), must match exactly. diff --git a/src/main/java/tppitweaks/creativeTab/CreativeTabTPPI.java b/src/main/java/tppitweaks/creativeTab/CreativeTabTPPI.java index 5f7348a..9abf966 100644 --- a/src/main/java/tppitweaks/creativeTab/CreativeTabTPPI.java +++ b/src/main/java/tppitweaks/creativeTab/CreativeTabTPPI.java @@ -1,6 +1,7 @@ package tppitweaks.creativeTab; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; import tppitweaks.item.ModItems; import tppitweaks.lib.Reference; @@ -12,8 +13,9 @@ public CreativeTabTPPI(int id) } @Override - public int getTabIconItemIndex() { - return ModItems.tppiBook.itemID; + public ItemStack getIconItemStack() + { + return new ItemStack(ModItems.tppiMaterial, 1, 1); } @Override diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index a6efd22..2542a42 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -1,29 +1,13 @@ 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.living.LivingDeathEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import tppitweaks.TPPITweaks; -import tppitweaks.client.gui.GuiHelper; import tppitweaks.client.gui.IRCGui; import tppitweaks.client.gui.MaricultureGui; -import tppitweaks.client.gui.UpdateGui; import tppitweaks.config.ConfigurationHandler; -import tppitweaks.lib.Reference; 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; @@ -32,24 +16,13 @@ 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.manuallyChangeConfigValue("B:showDownloadGUI", "true", "false"); - } - else if (shouldLoadGUI && ConfigurationHandler.showMaricultureGui) + if (shouldLoadGUI && ConfigurationHandler.showMaricultureGui) { event.gui = new MaricultureGui(); shouldLoadGUI = false; @@ -59,128 +32,9 @@ else if (shouldLoadGUI && ConfigurationHandler.showIRCGui) event.gui = new IRCGui(); shouldLoadGUI = false; } - 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) - { - if (event.entityLiving instanceof EntityPlayer) - { - savePlayerNBT((EntityPlayer) event.entityLiving); - } - } - - private void savePlayerNBT(EntityPlayer player) - { - TPPITweaks.logger.log(Level.INFO, "getting NBT"); - - NBTValOnDeath = player.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) { diff --git a/src/main/java/tppitweaks/item/ModItems.java b/src/main/java/tppitweaks/item/ModItems.java index 96a36ef..7a8800c 100644 --- a/src/main/java/tppitweaks/item/ModItems.java +++ b/src/main/java/tppitweaks/item/ModItems.java @@ -1,6 +1,5 @@ package tppitweaks.item; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import tppitweaks.config.ConfigurationHandler; @@ -10,27 +9,19 @@ public class ModItems { - public static TPPIBook tppiBook; public static TPPIMaterial tppiMaterial; - public static void initItems() { - if (ConfigurationHandler.bookID != 0) - { - tppiBook = new TPPIBook(ConfigurationHandler.bookID); - GameRegistry.registerItem(tppiBook, "tppiBook"); - } - + public static void initItems() + { if (ConfigurationHandler.materialID != 0) { tppiMaterial = new TPPIMaterial(ConfigurationHandler.materialID); GameRegistry.registerItem(tppiMaterial, "tppiMaterial"); } } - + public static void registerRecipes() - { - GameRegistry.addShapelessRecipe(tppiBook.getGuide(), Item.ingotIron, Item.paper, Item.paper, Item.paper); - + { if(Loader.isModLoaded("AppliedEnergistics") && Loader.isModLoaded("StevesFactoryManager") && ConfigurationHandler.tweakSFM) { GameRegistry.addRecipe(new ItemStack(tppiMaterial.itemID, 1, 1), new Object[] { diff --git a/src/main/java/tppitweaks/item/TPPIBook.java b/src/main/java/tppitweaks/item/TPPIBook.java deleted file mode 100644 index fb47b73..0000000 --- a/src/main/java/tppitweaks/item/TPPIBook.java +++ /dev/null @@ -1,167 +0,0 @@ -package tppitweaks.item; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemEditableBook; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import tppitweaks.TPPITweaks; -import tppitweaks.client.gui.GuiHelper; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.util.FileLoader; -import tppitweaks.util.TxtParser; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; - -public class TPPIBook extends ItemEditableBook -{ - public TPPIBook(int par1) - { - super(par1); - setCreativeTab(TPPITweaks.creativeTab); - } - - private Icon[] icons = new Icon[3]; - private String[] unlocNames = {"tppiWelcomePacket", "tppiChangelog", "tppiGuide"}; - - @Override - public void registerIcons(IconRegister par1IconRegister) - { - icons[0] = par1IconRegister.registerIcon("tppitweaks:tppibook"); - icons[1] = Item.writtenBook.getIconFromDamage(0); - icons[2] = par1IconRegister.registerIcon(ConfigurationHandler.guideSkin == 0 ? "tppitweaks:tppiGuide1" : "tppitweaks:tppiGuide2"); - } - - @Override - public Icon getIcon(ItemStack stack, int pass) - { - return icons[stack.getItemDamage()]; - } - - @Override - public Icon getIconFromDamage(int par1) - { - return icons[par1]; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (stack.getItemDamage() == 2 && FMLCommonHandler.instance().getSide().isClient()) - { - GuiHelper.doGuideGUI(); - } - else if (stack.stackTagCompound == null || !stack.getTagCompound().getString("version").equals(TPPITweaks.VERSION) || stack.getItemDamage() == 1) - { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - { - stack.setTagCompound(new NBTTagCompound()); - addTextToBook(stack, stack.getItemDamage()); - - player.inventoryContainer.detectAndSendChanges(); - - GuiHelper.doBookGUI(player, stack, false); - return stack; - } - } - else if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - GuiHelper.doBookGUI(player, stack, false); - return stack; - } - - public ItemStack addTextToBook(ItemStack book, int damage) - { - NBTTagCompound nbttagcompound; - NBTTagList bookPages; - - book.setTagInfo("author", new NBTTagString("author", ConfigurationHandler.bookAuthor)); - - switch (damage) - { - case 0: - book.setTagInfo("title", new NBTTagString("title", ConfigurationHandler.bookTitle)); - - nbttagcompound = book.getTagCompound(); - bookPages = new NBTTagList("pages"); - - for (int i = 0; i < ConfigurationHandler.bookText.size(); i++) - { - bookPages.appendTag(new NBTTagString("" + i, ConfigurationHandler.bookText.get(i))); - } - - nbttagcompound.setTag("pages", bookPages); - nbttagcompound.setString("version", TPPITweaks.VERSION); - - break; - case 1: - book.setTagInfo("title", new NBTTagString("title", ConfigurationHandler.changelogTitle)); - - nbttagcompound = book.getTagCompound(); - bookPages = new NBTTagList("pages"); - - if (ConfigurationHandler.changelog == null) - { - ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); - } - - for (int i = 0; i < ConfigurationHandler.changelog.size(); i++) - { - bookPages.appendTag(new NBTTagString("" + i, ConfigurationHandler.changelog.get(i))); - } - - nbttagcompound.setTag("pages", bookPages); - nbttagcompound.setString("version", TPPITweaks.VERSION); - - break; - } - return book; - } - - public ItemStack getGuide() - { - ConfigurationHandler.bookText = TxtParser.parseFileMain(FileLoader.getGuideText()); - return addTextToBook(new ItemStack(ModItems.tppiBook), 0); - } - - public ItemStack getChangelog() - { - ConfigurationHandler.changelog = TxtParser.parseFileMain(FileLoader.getChangelogText()); - return addTextToBook(new ItemStack(ModItems.tppiBook, 1, 1), 1); - } - - @Override - public boolean hasEffect(ItemStack par1ItemStack) - { - return false; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - par3List.add(new ItemStack(this, 1, 0)); - par3List.add(new ItemStack(this, 1, 1)); - par3List.add(new ItemStack(this, 1, 2)); - } - - @Override - public String getUnlocalizedName() - { - return "TPPIBook"; - } - - @Override - public String getUnlocalizedName(ItemStack par1ItemStack) - { - return unlocNames[par1ItemStack.getItemDamage()]; - } - -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/lib/Reference.java b/src/main/java/tppitweaks/lib/Reference.java index 416dd59..1768f8c 100644 --- a/src/main/java/tppitweaks/lib/Reference.java +++ b/src/main/java/tppitweaks/lib/Reference.java @@ -6,13 +6,6 @@ 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; diff --git a/src/main/java/tppitweaks/proxy/PacketHandler.java b/src/main/java/tppitweaks/proxy/PacketHandler.java deleted file mode 100644 index 5e58e67..0000000 --- a/src/main/java/tppitweaks/proxy/PacketHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package tppitweaks.proxy; - -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; -import tppitweaks.client.gui.GuiHelper; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.Player; - -public class PacketHandler implements IPacketHandler -{ - - @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) - { - switch(packet.data[0]) - { - case 0: - GuiHelper.doDownloaderGUI(); - } - } -} diff --git a/src/main/java/tppitweaks/util/FileLoader.java b/src/main/java/tppitweaks/util/FileLoader.java deleted file mode 100644 index cef7165..0000000 --- a/src/main/java/tppitweaks/util/FileLoader.java +++ /dev/null @@ -1,248 +0,0 @@ -package tppitweaks.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; - -import tppitweaks.TPPITweaks; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.lib.Reference; - -public class FileLoader -{ - private static InputStream bookText, supportedMods, changelogText; - - public static void init(File file, int attempt) throws IOException - { - File dir = new File(file.getParent() + ""); - if (!dir.exists()) - dir.mkdir(); - - /* - * From here down commented out as it was - * deemed useless and counter-productive. - * If we add versioning for user-added content, - * this becomes useful again - */ - - /* - try - { - bookText = new FileInputStream(new File(file.getParent() + "/BookText.txt")); - } - catch(FileNotFoundException e) - { - Scanner scan = new Scanner(TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/BookText.txt")); - - FileWriter newBookText = new FileWriter(new File(file.getParent() + "/BookText.txt")); - - while (scan.hasNext()) - { - newBookText.write(scan.nextLine() + "\n"); - } - - scan.close(); - newBookText.flush(); - newBookText.close(); - - if (attempt < 1) - init(file, 1); - else - { - System.err.println("TPPI Tweaks - IO Error, books will be partly non-functional. \n"); - e.printStackTrace(); - } - } - - try - { - supportedMods = new FileInputStream(new File(file.getParent() + "/SupportedMods.txt")); - } - catch(FileNotFoundException e) - { - Scanner scan = new Scanner(TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/SupportedMods.txt")); - - FileWriter newBookText = new FileWriter(new File(file.getParent() + "/SupportedMods.txt")); - - while (scan.hasNext()) - { - newBookText.write(scan.nextLine() + "\n"); - } - - scan.close(); - newBookText.flush(); - newBookText.close(); - - if (attempt < 3) - init(file, 2); - else - { - System.err.println("TPPI Tweaks - IO Error, books will be partly non-functional. \n"); - e.printStackTrace(); - } - } - */ - } - - public static boolean disableMod(String partOfName, String extension) - { - boolean hasChanged = false; - for (File f : getMods(partOfName)) - { - TPPITweaks.logger.info("Disabling: " + f.getName()); - if (!f.getName().contains(extension)) - { - f.renameTo(new File(f.getAbsolutePath() + extension)); - System.out.println(f.getAbsolutePath() + " " + extension); - hasChanged = true; - } - else - { - TPPITweaks.logger.info(partOfName + " was already disabled!"); - } - } - return hasChanged; - } - - public static boolean enableMod(String partOfName, String extensionToRemove) - { - boolean hasChanged = false; - for (File f : getMods(partOfName)) - { - TPPITweaks.logger.info("Enabling: " + f.getName()); - if (f.getName().contains(extensionToRemove)) - { - f.renameTo(new File(f.getAbsolutePath().replace(extensionToRemove, ""))); - hasChanged = true; - } - else - { - TPPITweaks.logger.info(partOfName + " was already enabled!"); - } - } - return hasChanged; - } - - /** - * Finds all mods that contain the passed string in their filename that exist in the /mods folder - * @return A list of Files that are mod jars (or zips) - */ - public static ArrayList getMods(String partOfName) - { - ArrayList files = new ArrayList(); - File mods; - - mods = Reference.modsFolder; - - String[] fileNames = mods.list(); - ArrayList foundNames = new ArrayList(); - - for (String s : fileNames) - { - if (s.toLowerCase().contains(partOfName.toLowerCase())) - foundNames.add(s); - } - - for (String s : foundNames) - files.add(new File(mods, s)); - - return files; - } - - /* - public static void getThaumicTinkererFilenameState() { - - File modJar; - - modJar = new File(Reference.modsFolder, Reference.TTFilename).exists() ? new File(Reference.modsFolder, Reference.TTFilename) : new File(Reference.modsFolder, Reference.TTFilename + EXTENSION); - if(modJar.exists()) { - Reference.TTFilename = modJar.getName(); - } - - modJar = new File(Reference.modsFolder, Reference.KAMIFilename).exists() ? new File(Reference.modsFolder, Reference.KAMIFilename) : new File(Reference.modsFolder, Reference.KAMIFilename + EXTENSION); - if(modJar.exists()) { - Reference.KAMIFilename = modJar.getName(); - } - - } - */ - - public static InputStream getGuideText() - { - bookText = loadFile(new File(ConfigurationHandler.cfg.getParent() + "/BookText.txt")); - return bookText; - } - - public static InputStream getChangelogText() - { - changelogText = loadFile(new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt")); - return changelogText; - } - - public static InputStream getSupportedModsFile() - { - supportedMods = loadFile(new File(ConfigurationHandler.cfg.getParent() + "/" + ConfigurationHandler.supportedModsName + ".txt")); - return supportedMods; - } - - private static InputStream loadFile(File file) - { - if (!file.exists()) - { - FileWriter fw; - try - { - file.createNewFile(); - fw = new FileWriter(file); - fw.write("Default file, please make sure the correct file, " + file.getName() + ", exists in the TPPI config directory before launching next time!"); - fw.flush(); - fw.close(); - } catch (IOException e1) { - TPPITweaks.logger.severe("Could not create default file" + file.getName() + "!"); - e1.printStackTrace(); - } - } - - try - { - return new FileInputStream(file); - } - catch (FileNotFoundException e) - { - IOErr(file.getName(), e); - return null; - } - } - - private static void IOErr(String filename, IOException e) - { - TPPITweaks.logger.severe("IO error while loading TPPITweaks, make sure nothing in the config folder is actively open and Minecraft has permission to read those files!"); - e.printStackTrace(); - throw new RuntimeException("IO Error in TPPITweaks file loading, file: " + filename); - } - - /* - public static void removeDuplicateMods() - { - ArrayList jars = getMod(); - File removedTT = new File(Reference.modsFolder.getAbsolutePath() + "/" + Reference.TTFilename + EXTENSION); - File removedKAMI = new File(Reference.modsFolder.getAbsolutePath() + "/" + Reference.KAMIFilename + EXTENSION); - - for (File f : jars) - { - if (f != null && removedTT.exists()) - { - removedTT.delete(); - } - if (f != null && removedKAMI.exists()) - { - removedKAMI.delete(); - } - } - } - */ -} diff --git a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java b/src/main/java/tppitweaks/util/TPPIPlayerTracker.java deleted file mode 100644 index 412a9ee..0000000 --- a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java +++ /dev/null @@ -1,59 +0,0 @@ -package tppitweaks.util; - -import java.util.logging.Level; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import tppitweaks.TPPITweaks; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.event.TPPIEventHandler; -import tppitweaks.item.ModItems; -import cpw.mods.fml.common.IPlayerTracker; - -public class TPPIPlayerTracker implements IPlayerTracker -{ - - @Override - public void onPlayerLogin(EntityPlayer player) - { - addBook(player); - } - - @Override - public void onPlayerLogout(EntityPlayer player) - { - // Do Nothing - } - - @Override - public void onPlayerChangedDimension(EntityPlayer player) - { - TPPIEventHandler.NBTValOnDeath = player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook"); - } - - @Override - public void onPlayerRespawn(EntityPlayer player) - { - TPPITweaks.logger.log(Level.INFO, "adding NBT: " + TPPIEventHandler.NBTValOnDeath); - player.getEntityData().setTag("TPPI", TPPITweaks.eventHandler.getTag(player, true)); - - addBook(player); - } - - private boolean addBook(EntityPlayer player) - { - if (player != null && ConfigurationHandler.doSpawnBook && !player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook") && !player.worldObj.isRemote) - { - TPPITweaks.logger.log(Level.INFO, "Adding book"); - - player.getEntityData().setTag("TPPI", TPPITweaks.eventHandler.getTag(player, false)); - - ItemStack stack = ModItems.tppiBook.getGuide(); - player.inventory.addItemStackToInventory(stack); - return true; - } - - return false; - } - -} diff --git a/src/main/java/tppitweaks/util/TPPITweaksUtils.java b/src/main/java/tppitweaks/util/TPPITweaksUtils.java index 88f988c..67debac 100644 --- a/src/main/java/tppitweaks/util/TPPITweaksUtils.java +++ b/src/main/java/tppitweaks/util/TPPITweaksUtils.java @@ -1,5 +1,6 @@ package tppitweaks.util; +import java.io.File; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -10,6 +11,8 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.ForgeDirection; +import tppitweaks.TPPITweaks; +import tppitweaks.lib.Reference; /** * @author AidanBrady, butchered by tterrag @@ -153,4 +156,69 @@ public String getPrefix() return prefix + "/"; } } + + public static boolean disableMod(String partOfName, String extension) + { + boolean hasChanged = false; + for (File f : getMods(partOfName)) + { + TPPITweaks.logger.info("Disabling: " + f.getName()); + if (!f.getName().contains(extension)) + { + f.renameTo(new File(f.getAbsolutePath() + extension)); + System.out.println(f.getAbsolutePath() + " " + extension); + hasChanged = true; + } + else + { + TPPITweaks.logger.info(partOfName + " was already disabled!"); + } + } + return hasChanged; + } + + public static boolean enableMod(String partOfName, String extensionToRemove) + { + boolean hasChanged = false; + for (File f : getMods(partOfName)) + { + TPPITweaks.logger.info("Enabling: " + f.getName()); + if (f.getName().contains(extensionToRemove)) + { + f.renameTo(new File(f.getAbsolutePath().replace(extensionToRemove, ""))); + hasChanged = true; + } + else + { + TPPITweaks.logger.info(partOfName + " was already enabled!"); + } + } + return hasChanged; + } + + /** + * Finds all mods that contain the passed string in their filename that exist in the /mods folder + * @return A list of Files that are mod jars (or zips) + */ + public static ArrayList getMods(String partOfName) + { + ArrayList files = new ArrayList(); + File mods; + + mods = Reference.modsFolder; + + String[] fileNames = mods.list(); + ArrayList foundNames = new ArrayList(); + + for (String s : fileNames) + { + if (s.toLowerCase().contains(partOfName.toLowerCase())) + foundNames.add(s); + } + + for (String s : foundNames) + files.add(new File(mods, s)); + + return files; + } } diff --git a/src/main/java/tppitweaks/util/TxtParser.java b/src/main/java/tppitweaks/util/TxtParser.java index b62f6bf..00b81e2 100644 --- a/src/main/java/tppitweaks/util/TxtParser.java +++ b/src/main/java/tppitweaks/util/TxtParser.java @@ -6,7 +6,6 @@ import java.util.logging.Level; import tppitweaks.TPPITweaks; -import tppitweaks.command.CommandTPPI; /** * Beware all ye who enter here, for the sake of your sanity, turn back @@ -60,7 +59,7 @@ public static ArrayList parseFileMain(InputStream file) } } else - TPPITweaks.logger.log(Level.WARNING, "TPPI - Invalid line-skip in changelog. This may not work as intended"); + TPPITweaks.logger.log(Level.WARNING, "ModpackTweaks - Invalid line-skip in changelog. This may not work as intended"); } // Finally, do not add this to the page continue; @@ -188,7 +187,7 @@ public static ArrayList parseFileMods(InputStream file, String modName) } } else - TPPITweaks.logger.log(Level.WARNING, "TPPI - Invalid line-skip in changelog. This may not work as intended"); + TPPITweaks.logger.log(Level.WARNING, "ModpackTweaks - Invalid line-skip in changelog. This may not work as intended"); } // Finally, do not add this to the page @@ -239,32 +238,4 @@ public static ArrayList parseFileMods(InputStream file, String modName) return bookText; } - - /** - * Gets mod names from the file - * @param file - * @return an array of Strings, the names of mods that are described in the file, evidenced by the >< identifier - */ - public static ArrayList getSupportedMods(InputStream file) - { - ArrayList mods = new ArrayList(); - - Scanner scanner; - scanner = new Scanner(file); - - parseFileMain(file); - - for (String s : useableLines) - { - if (s.startsWith(">") && s.contains("<")) - { - String[] nameThatHasBeenSplit = s.substring(1, s.indexOf('<')).split(", "); - CommandTPPI.addProperNameMapping(nameThatHasBeenSplit[0], nameThatHasBeenSplit[1]); - mods.add(nameThatHasBeenSplit[0]); - } - } - scanner.close(); - - return mods; - } } From 58ab4c459645240169373208b07384a8a4663433 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Thu, 12 Jun 2014 00:24:20 -0400 Subject: [PATCH 14/30] Disable the MJ adapter in EngToolbox. Delete old assets. --- .../modTweaks/EngToolboxTweaks.java | 17 +++++++++++++++++ .../tppitweaks/textures/gui/guiGuide.png | Bin 262950 -> 0 bytes .../tppitweaks/textures/gui/guiGuide_alt.png | Bin 49773 -> 0 bytes .../tppitweaks/textures/items/tppiGuide1.png | Bin 8394 -> 0 bytes .../textures/items/tppiGuide1.png.mcmeta | 1 - .../tppitweaks/textures/items/tppiGuide2.png | Bin 503 -> 0 bytes .../textures/items/tppiGuide_old.png | Bin 1166 -> 0 bytes .../tppitweaks/textures/items/tppibook.png | Bin 311 -> 0 bytes .../tppitweaks/textures/items/tppibook1.png | Bin 430 -> 0 bytes .../tppitweaks/textures/items/tppibookALT.png | Bin 341 -> 0 bytes 10 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/main/java/tppitweaks/recipetweaks/modTweaks/EngToolboxTweaks.java delete mode 100644 src/main/resources/assets/tppitweaks/textures/gui/guiGuide.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/gui/guiGuide_alt.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppiGuide1.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppiGuide1.png.mcmeta delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppiGuide2.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppiGuide_old.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppibook.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppibook1.png delete mode 100644 src/main/resources/assets/tppitweaks/textures/items/tppibookALT.png diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EngToolboxTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EngToolboxTweaks.java new file mode 100644 index 0000000..2340be7 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EngToolboxTweaks.java @@ -0,0 +1,17 @@ +package tppitweaks.recipetweaks.modTweaks; + +import emasher.sockets.SocketsMod; +import net.minecraft.block.Block; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.TweakingRegistry; +import tterrag.rtc.TweakingRegistry.TweakingAction; + +public class EngToolboxTweaks +{ + @RecipeRemoval(time = EventTime.POST_INIT) + public static void removeRecipes() + { + TweakingRegistry.markItemForRecipeRemoval(((Block) SocketsMod.mjAdapter).blockID, -1, TweakingAction.REMOVED, "Infinite energy bug."); + } +} diff --git a/src/main/resources/assets/tppitweaks/textures/gui/guiGuide.png b/src/main/resources/assets/tppitweaks/textures/gui/guiGuide.png deleted file mode 100644 index bc78394bac37aeb95e6c9f8b88b1eaa5796ee35d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262950 zcmeI5U5s5-701tvgHuq3f}Lr^m^RuDBoZG~NQFcKEz-f1pjMFx0f`~uLHxi60wFVj zsNkcE1RAkM9}I~}jeLkDycp611Qc4!XSFSu7zSvs-51vBntjjLz2}^L&pGRN z39P;M*?X_GerwMEew}-`^Ri1XKKZ26Pl}@Gx$TcV!(=k8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items/tppiGuide1.png b/src/main/resources/assets/tppitweaks/textures/items/tppiGuide1.png deleted file mode 100644 index a1a952db5faf79e6df5ac23fbe5acebab99838e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8394 zcmeHN%`Zbi5PxlaCv^}fhjKvT>>ofYR6`IFPJ~9BN_-q}a}gJ`Zi2XxNZd#qaB%P+ zI3R>SMD0BJt=D;P`?P6Am`cr?kDZzQ?asWlu{k)<6RK&bu`DYT>x~X8+N8c6RTb*@ z+Sc-!A{A5do~V_fpQEeeT_vfW?;T&XtlC@p2JYrg5=vOP6zlJq2dj_&s@w zMLS1k%L5%vH!sRUK7znMM<9Uthr^8-Jb#BaH@9S&Jv}{U@qWzP+p8Tr=x11JeHj8^ zMt!5L5amg~H}2x}!S<^VuxU{c*iT*One3OjPJq@B>qrg@b?P_H8Hdu)34G=B`IMNC z=p>L3oO3=g*JTfK>bXA?uM?m>fPFy5@0skPm`;8Mfg=P3PZTmxrw-3Nj!pmupoeN1 zoQ@9Cg|9PwdQn#&NUp@a?20B!Z=Bn{es3Qr+EfjWu+MV#0qk;v4^J^Fz*Ct+s5c?6 zdmF2fw-waU3+wb0{%$I-2r+a9KGbQL&fhd^9LJn6Wc`{lewfY&DiVZe-PO#H)b zpeMOW$K&V(FxW)*cCK7AG}#ggP9#irB$qzmLLe7hP95qQGQ3H_`_W(13H=fky&xb6 z2m*q@-$y{+hWb#7_q*H=(6-O#P|3^0?=Z^$E-;>o<$gf!2l(bH74PZ;r3wVU=r?jd z07Uc>KmaQD13&__(E9Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qRNAp5A0004INklXa5Qg`Oy!6ty@)ZCT zuMA3EP{3Z0Vi3?+P*Leku_Zpqm~Y&(8-w>c$)8hZ{we4D*8i~3oF$W9PM$i4@;b=N zxP72!@HQ;SsI{-Fxx){~CHrSB=|Ai!x{WRA-ES*eHyP>NZ7K$jyL!jkzRfDfO)@`Y z$yq5Z<=l$YYe~7T+EOj7%K1q|F3K?l=c`IWS7PBP+1RkTr>%kK?vXo=8O@Bt{-uBX zlZ+9Nv4fI~`ZWNo#}|aeBuYgCl1(jZ0*W{^&j`Xv6+jmz5y?5fkBaUiJ2cM-bV>UP+tdpb}!K8NPn=cKFzoK&Qe*&9&AyoW>cjJ9;nWKgS^N~~#nNj4ITVn=*R zW<-bfZTu(Msfrdp#w8^)5*7J-{M?&gni3LZ2ndNJ&3ak|L$DDTiMU5tzX}QAAe2fz tq~hURE3T>U@-*&>3ZYF2>5t5^z5waV=})|9y!HS9002ovPDHLkV1gW5*7pDa diff --git a/src/main/resources/assets/tppitweaks/textures/items/tppiGuide_old.png b/src/main/resources/assets/tppitweaks/textures/items/tppiGuide_old.png deleted file mode 100644 index 89411fec586447191d5da95cd70eca64165329ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1166 zcmdT?p-uxq5S`sUT4+*IEF`Tdby$LhT+<$ehCmGt2o3=Wd;tl9AQ4y`q=I0Ohz7wo zG&CgCp%6&!c6o2Ft!Wh)*v;PT&d$7f^Y+d+8nt|GHYXzas2*;@7Puxe_?AB1E=*=` ztrm*oynej7glFogzI`k*{lul74{!J3%$`K+)$FU*6AR{|eby2Q=Av-9xiq5+!N(UO z{=z60OFyQem&<5Q5Ldlu}LC0dY@7iu_$3Q z9VymBt3v=pVz2`5c(6=%R+KUD8Bv%HOM5iDm~)a?>vNdv0mvZcb7EQq(Ctt%0VvM| z;b5`?PypaTdqW1w`7J5*15@-g6?-!1gRqZ*E<*-dvoff{qr6v345}<{Y5UB`i2e}< z3}Wvb3f8#-pg#taD#U|zHuiw2`X~Th_&TvoMj0eYEE-iw xFKri(2~ghxx^n=hh`v$m2O4-~e)A)FivRo5dB18O+%Imii>TTN?^bqBzX6wGxvBsF diff --git a/src/main/resources/assets/tppitweaks/textures/items/tppibook.png b/src/main/resources/assets/tppitweaks/textures/items/tppibook.png deleted file mode 100644 index 8407f82bfbe6f8ac60569af7b296185663d4bade..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{^MbQ4*Y=R#Ki=l*$m0n3-3i=jR%tP-d)Ws%L2E{@KYKsA{vP zi(`m||K7=gT!$5S9QH1^|93iXGjj#^`oIYX^B#X=nwSxqBG0|V>t(fC?yEcYO3!2J zt=K2@7@n%qkv#bNYu=)@DXdBtmdu)+!n$mV*1=bMr>ETa%;}HPT7Bs2&kP~$93eBY zD?zgvY9^GtZ4p?aa{IYY(}gC34Sn94soH@O9ZxEQSnep4O%fD&Abq!bhG*G>x5a%^ zZv?&Vyli>l;0B>6E4H^OD_yGZ%-b<5`|aN+&wnz+AH6Z-`=_dlK<6`fy85}Sb4q9e E07GUO=O)Sx8fhQW5<#Bs0}q z{Z4akrb9#GEau)h_k6$eow;MIwfIkXzlqDnxDE|#O}c&}K!vA|&+vi(pHT$n(h!p# zL4{|nwlw?bb&<=@%ASzJjZh<$z@33tKSKgX@i&von?71HX4 zJd+69;g3T77aV}qNhc4DCjrnZgI}DXLU|cJ#sEwzL`Rq;oCr{e7Nk3BUe|99^x&`S Y7nAGZ?XG-#MF0Q*07*qoM6N<$f-ywA<^TWy diff --git a/src/main/resources/assets/tppitweaks/textures/items/tppibookALT.png b/src/main/resources/assets/tppitweaks/textures/items/tppibookALT.png deleted file mode 100644 index 7a99b52b351d6a73e3179af577ccb4601ceba23f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvhRPT^vI!{P#{i$a`3U$JH{_wsckB1?g2snC>nJn*M?z=it<{8uyR% zH72>*ikxg@e*e&4==ndxAg`y(iy4G!thfJsG2_5>SC?hUoMDZRSKalQBwA75*3@{j z+P~FQsdLHc6Kk){eE6xZ!-cz?Gl%O*m@7lggpxw18&Q`mw{M*m@cNhBtAj@#2`1<4 z6ccLPxLoYpVvh&wmQN}+Q&kC9__p}Kw$m}5IsplF@{3bSAF;ez@8mgQWA;^+{T?ch h6ALE15l{K=DBtZ6D*DFZRX5N-44$rjF6*2UngGiOg)aaA From d4f735be6ba7415814bacc9b66ea8765681ff67c Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 18 Jun 2014 13:41:23 -0400 Subject: [PATCH 15/30] Splash texts because why not --- .../tppitweaks/event/TPPIEventHandler.java | 26 +++++++++++++++++++ .../assets/tppitweaks/lang/en_US.lang | 6 +++++ 2 files changed, 32 insertions(+) diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index 2542a42..fa2c951 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -1,6 +1,9 @@ package tppitweaks.event; +import java.util.Random; + import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.util.StatCollector; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -9,6 +12,7 @@ import tppitweaks.config.ConfigurationHandler; import tppitweaks.recipetweaks.modTweaks.DATweaks; import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -32,6 +36,10 @@ else if (shouldLoadGUI && ConfigurationHandler.showIRCGui) event.gui = new IRCGui(); shouldLoadGUI = false; } + else + { + ObfuscationReflectionHelper.setPrivateValue(GuiMainMenu.class, (GuiMainMenu) event.gui, getRandTPPISplash(), "splashText", "field_73975_c"); + } } } @@ -43,4 +51,22 @@ public void onItemTooltip(ItemTooltipEvent event) DATweaks.addTooltip(event); } } + + /** + * Automatically figures out the number of splash text lines in the lang file, returns a random one. + */ + private String getRandTPPISplash() + { + int max = 1; + String base = "tppi.splash.text."; + while (!StatCollector.translateToLocal(base + max).equals(base + max)) + { + max++; + } + max--; + + int rand = new Random().nextInt(max) + 1; + + return StatCollector.translateToLocal("tppi.splash.text." + rand); + } } \ No newline at end of file diff --git a/src/main/resources/assets/tppitweaks/lang/en_US.lang b/src/main/resources/assets/tppitweaks/lang/en_US.lang index 7a15170..84ccac1 100644 --- a/src/main/resources/assets/tppitweaks/lang/en_US.lang +++ b/src/main/resources/assets/tppitweaks/lang/en_US.lang @@ -7,3 +7,9 @@ tppiGuide.name=TPPI Mod Guide disassemblerCore.name=Disassembly Core miningCore.name=Enderman Mining Assistant tile.redstoneCompressed.name=Compressed Redstone Block + +tppi.splash.text.1=Why didn't you ignore? +tppi.splash.text.2=test splash please ignore +tppi.splash.text.3=#blametterrag +tppi.splash.text.4=Don't Panic! +tppi.splash.text.5=DON'T TEST THE BOT! \ No newline at end of file From e78c0fb38835d8e10e6f6b759b8e82232de33ab5 Mon Sep 17 00:00:00 2001 From: esKaayY Date: Fri, 20 Jun 2014 23:53:53 -0400 Subject: [PATCH 16/30] More splashes! Ninja'd you tterrag --- src/main/resources/assets/tppitweaks/lang/en_US.lang | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/tppitweaks/lang/en_US.lang b/src/main/resources/assets/tppitweaks/lang/en_US.lang index 84ccac1..f9928a2 100644 --- a/src/main/resources/assets/tppitweaks/lang/en_US.lang +++ b/src/main/resources/assets/tppitweaks/lang/en_US.lang @@ -12,4 +12,6 @@ tppi.splash.text.1=Why didn't you ignore? tppi.splash.text.2=test splash please ignore tppi.splash.text.3=#blametterrag tppi.splash.text.4=Don't Panic! -tppi.splash.text.5=DON'T TEST THE BOT! \ No newline at end of file +tppi.splash.text.5=DON'T TEST THE BOT! +tppi.splash.text.6=You're famous now Tom7890! +tppi.splash.text.7=You better be testin'! From bf3bfbed11227686991c2d3d1a50a70565c9fe2b Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Tue, 1 Jul 2014 20:29:14 -0400 Subject: [PATCH 17/30] Remove mekanism processing materials from oreDict (only the 3x/4x ones) --- .../modTweaks/MekanismTweaks.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 5ef1000..6deae41 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -1,6 +1,8 @@ package tppitweaks.recipetweaks.modTweaks; +import java.lang.reflect.Field; import java.util.ArrayList; +import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.item.Item; @@ -39,6 +41,41 @@ public static void init() { TweakingRegistry.markItemForRecipeRemoval(mekanism.common.Mekanism.machineBlockID, 4, TweakingAction.CHANGED, "Changed to balance better", "with other quarry-like blocks"); } + + //remove all the mekanism 3x/4x materials + try + { + Field f = OreDictionary.class.getDeclaredField("oreIDs"); + f.setAccessible(true); + HashMap temp = (HashMap) f.get(null); + + //remove crystals + temp.remove("crystalIron"); + temp.remove("crystalGold"); + temp.remove("crystalOsmium"); + temp.remove("crystalCopper"); + temp.remove("crystalTin"); + temp.remove("crystalSilver"); + temp.remove("crystalObsidian"); + temp.remove("crystalLead"); + + //remove shards + temp.remove("shardIron"); + temp.remove("shardGold"); + temp.remove("shardOsmium"); + temp.remove("shardCopper"); + temp.remove("shardTin"); + temp.remove("shardSilver"); + temp.remove("shardObsidian"); + temp.remove("shardLead"); + + f.set(null, temp); + } + catch (Throwable t) + { + t.printStackTrace(); + } + } @RecipeAddition(requiredModids="Mekanism") From f7882b6359754472ec81c295985c48a05fed3e2f Mon Sep 17 00:00:00 2001 From: Johannes13 Date: Wed, 2 Jul 2014 09:51:42 +0200 Subject: [PATCH 18/30] Allow disabling certain Extruder reecipes. --- .../config/ConfigurationHandler.java | 2 + .../modTweaks/GregtechTweaks.java | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 3ddc984..75e4033 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -55,6 +55,7 @@ public class ConfigurationHandler public static boolean doCharcoalBlockCompression; public static boolean makeEIOHardModeEasier; public static boolean unregisterFusedQuartz; + public static String[] removeExtruderInput; public static boolean addEssenceSeedRecipe; @@ -133,6 +134,7 @@ public static void init(File file) unnerfPaperRecipe = config.get("Gregtech Tweaks", "unnerfPaperRecipe", true, "Revert GregTech's paper recipe output nerf.").getBoolean(true); readdResinSmelting = config.get("Gregtech Tweaks", "readdResinSmelting", true, "Re-add the IC2 sticky resin to rubber smelting recipe.").getBoolean(true); doCharcoalBlockCompression = config.get("Gregtech Tweaks", "doCharcoalBlockCompression", true, "Charcoal blocks can be compressed to coal via compressor.").getBoolean(true); + removeExtruderInput = config.get("Gregtech Tweaks", "removeExtruderInput", new String[] {"crystalIron", "crystalGold", "crystalOsmium", "crystalCopper", "crystalTin", "crystalSilver", "crystalObsidian", "crystalLead"}, "Disable this Ore Dict items as valid items for the Extruder").getStringList(); showMaricultureGui = config.get("Mod Loading Tweaks", "showMaricultureGUI", false, "Show the mariculture fix GUI on startup.").getBoolean(false); showIRCGui = config.get("Mod Loading Tweaks", "showIRCGui", true, "Show the IRC integration startup GUI").getBoolean(true); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index e08f827..e752c8b 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -1,6 +1,12 @@ package tppitweaks.recipetweaks.modTweaks; +import gregtechmod.api.util.GT_Recipe; + +import java.util.ArrayList; import java.util.HashSet; +import java.util.Map; + +import org.apache.commons.lang3.ArrayUtils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -74,6 +80,45 @@ public static void doStuff() } } } + + @SuppressWarnings("unchecked") + @RecipeRemoval(requiredModids={"IC2", "gregtech_addon"}, time=EventTime.PLAYER_JOIN) + public static void removeLater() { + String[] blacklist = ConfigurationHandler.removeExtruderInput; + Map extruderRecipies; + ArrayList recipesToRemove = new java.util.ArrayList(); + try + { + extruderRecipies = (java.util.Map) GT_Recipe.class.getField("pExtruderRecipes").get(null); + for (java.util.Map.Entry entry : extruderRecipies.entrySet()) + { + GT_Recipe rec = entry.getValue(); + int oreDictId = OreDictionary.getOreID(rec.getRepresentativeInput1()); + if (oreDictId != -1) + { + String oreDictName = OreDictionary.getOreName(oreDictId); + if (oreDictName != null && ArrayUtils.contains(blacklist, oreDictName)) + { + recipesToRemove.add(entry.getKey()); + } + } + + } + for (Long id : recipesToRemove) { + extruderRecipies.remove(id); + } + System.out.println("Removed " + recipesToRemove.size() + " recipies from the GT Extruder"); + } + catch (Exception e) + { + e.printStackTrace(); + if (e instanceof RuntimeException) + { + throw (RuntimeException) e; + } + throw new RuntimeException("Exception while removing GT Extruder Recipies", e); + } + } @RecipeAddition(time=EventTime.PLAYER_JOIN, requiredModids={"IC2", "gregtech_addon"}) public static void doPostLoadRecipeAdditions() { From 132641c6cd4cae94c96ab241ee1b392282577303 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 2 Jul 2014 04:48:50 -0400 Subject: [PATCH 19/30] Move to WORLD_LOAD as it was refactored in RTC --- .../tppitweaks/event/TPPIEventHandler.java | 2 + src/main/java/tppitweaks/lib/Reference.java | 2 + .../recipetweaks/modTweaks/CCTweaks.java | 53 +++++++++++++++++++ .../recipetweaks/modTweaks/ExUTweaks.java | 2 +- .../modTweaks/GregtechTweaks.java | 2 +- .../recipetweaks/modTweaks/IC2Tweaks.java | 2 +- .../modTweaks/RailcraftTweaks.java | 2 +- .../assets/tppitweaks/lang/en_US.lang | 1 + 8 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index fa2c951..f6e655d 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -52,6 +52,8 @@ public void onItemTooltip(ItemTooltipEvent event) } } + public void doSomething() {} + /** * Automatically figures out the number of splash text lines in the lang file, returns a random one. */ diff --git a/src/main/java/tppitweaks/lib/Reference.java b/src/main/java/tppitweaks/lib/Reference.java index 1768f8c..c6c8a23 100644 --- a/src/main/java/tppitweaks/lib/Reference.java +++ b/src/main/java/tppitweaks/lib/Reference.java @@ -38,6 +38,8 @@ public class Reference + "after:JABBA;" + "after:EnderIO;" + "after:ProjRed|Core;" + + "after:ComputerCraft;" + + "after:CCTurtle;" + "required-after:recipeTweakingCore"; public static String packName = "Test Pack Please Ignore"; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java new file mode 100644 index 0000000..6ab7e21 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java @@ -0,0 +1,53 @@ +package tppitweaks.recipetweaks.modTweaks; + +import java.util.Iterator; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.nbt.NBTTagCompound; +import tppitweaks.TPPITweaks; +import tterrag.rtc.RecipeAddition.EventTime; +import tterrag.rtc.RecipeRemoval; +import tterrag.rtc.RecipeTweakingCore; +import tterrag.rtc.TweakingRegistry; +import dan200.CCTurtle; +import dan200.ComputerCraft; + +public class CCTweaks +{ + @RecipeRemoval(requiredModids = "ComputerCraft", time = EventTime.POST_INIT) + public static void removeRecipes() + { + TweakingRegistry.markItemForRecipeRemoval(ComputerCraft.computerBlockID, 0); + TweakingRegistry.markItemForRecipeRemoval(ComputerCraft.computerBlockID, 16384); + TweakingRegistry.markItemForRecipeRemoval(CCTurtle.turtleBlockID, 0); + + TPPITweaks.logger.info("Removed IDs: " + ComputerCraft.computerBlockID + ", " + CCTurtle.turtleBlockID); + + removeAdvancedTurtle(); + } + + @SuppressWarnings("unchecked") + private static void removeAdvancedTurtle() + { + Iterator iter = CraftingManager.getInstance().getRecipeList().iterator(); + while (iter.hasNext()) + { + IRecipe recipe = iter.next(); + if (recipe instanceof ShapedRecipes) + { + ShapedRecipes sr = (ShapedRecipes) recipe; + ItemStack stack = sr.getRecipeOutput(); + Item item = Item.itemsList[CCTurtle.turtleAdvancedBlockID]; + if (stack != null && item == stack.getItem() && stack.stackTagCompound != null && stack.stackTagCompound.equals(new NBTTagCompound())) + { + RecipeTweakingCore.log("Removing advanced turtle recipe"); + iter.remove(); + } + } + } + } +} diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java index 4d128ad..54aff55 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java @@ -171,7 +171,7 @@ public static void addRecipes() { TPPITweaks.logger.info("Stahp, greg, I know. Blame Tema."); } - @RecipeAddition(requiredModids="ExtraUtilities", time=EventTime.PLAYER_JOIN) + @RecipeAddition(requiredModids="ExtraUtilities", time=EventTime.WORLD_LOAD) public static void doPostLoadRecipeAdditions() { ItemStack stableIngot = new ItemStack(ExtraUtils.unstableIngot); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index e752c8b..700636d 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -120,7 +120,7 @@ public static void removeLater() { } } - @RecipeAddition(time=EventTime.PLAYER_JOIN, requiredModids={"IC2", "gregtech_addon"}) + @RecipeAddition(time=EventTime.WORLD_LOAD, requiredModids={"IC2", "gregtech_addon"}) public static void doPostLoadRecipeAdditions() { if(ConfigurationHandler.unnerfPaperRecipe) { TweakingRegistry.addTweakedTooltip(Item.paper.itemID, -1, TweakingAction.ADDED, "Check recipe to ensure 3x output"); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java index 3151f88..6ef13f1 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java @@ -66,7 +66,7 @@ public static void addRecipes() { } } - @RecipeAddition(requiredModids="IC2", time=EventTime.PLAYER_JOIN) + @RecipeAddition(requiredModids="IC2", time=EventTime.WORLD_LOAD) public static void doPostLoadRecipeAdditions() { /* copypasta code, ignore horrible formatting */ diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java index 04dbdcb..490acd9 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java @@ -12,7 +12,7 @@ public class RailcraftTweaks { - @RecipeAddition(requiredModids={"Railcraft"}, time=EventTime.PLAYER_JOIN) + @RecipeAddition(requiredModids={"Railcraft"}, time=EventTime.WORLD_LOAD) public static void registerOres() { // Please don't kill me CJ diff --git a/src/main/resources/assets/tppitweaks/lang/en_US.lang b/src/main/resources/assets/tppitweaks/lang/en_US.lang index f9928a2..7421334 100644 --- a/src/main/resources/assets/tppitweaks/lang/en_US.lang +++ b/src/main/resources/assets/tppitweaks/lang/en_US.lang @@ -15,3 +15,4 @@ tppi.splash.text.4=Don't Panic! tppi.splash.text.5=DON'T TEST THE BOT! tppi.splash.text.6=You're famous now Tom7890! tppi.splash.text.7=You better be testin'! +tppi.splash.text.8=Tcon tools don't burn in lava! From b5ce27082126b6aa836d41fdd1e6e9a9b41fffe6 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 2 Jul 2014 04:53:27 -0400 Subject: [PATCH 20/30] Comment out CCTweaks, fix compile error in GTTweaks. --- .../recipetweaks/modTweaks/CCTweaks.java | 27 +++++-------------- .../modTweaks/GregtechTweaks.java | 2 +- .../modTweaks/MekanismTweaks.java | 1 + 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java index 6ab7e21..a3b3cb5 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/CCTweaks.java @@ -1,39 +1,24 @@ package tppitweaks.recipetweaks.modTweaks; -import java.util.Iterator; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.nbt.NBTTagCompound; -import tppitweaks.TPPITweaks; -import tterrag.rtc.RecipeAddition.EventTime; -import tterrag.rtc.RecipeRemoval; -import tterrag.rtc.RecipeTweakingCore; -import tterrag.rtc.TweakingRegistry; -import dan200.CCTurtle; -import dan200.ComputerCraft; public class CCTweaks { - @RecipeRemoval(requiredModids = "ComputerCraft", time = EventTime.POST_INIT) +// @RecipeRemoval(requiredModids = "ComputerCraft", time = EventTime.POST_INIT) public static void removeRecipes() { - TweakingRegistry.markItemForRecipeRemoval(ComputerCraft.computerBlockID, 0); +/* TweakingRegistry.markItemForRecipeRemoval(ComputerCraft.computerBlockID, 0); TweakingRegistry.markItemForRecipeRemoval(ComputerCraft.computerBlockID, 16384); TweakingRegistry.markItemForRecipeRemoval(CCTurtle.turtleBlockID, 0); TPPITweaks.logger.info("Removed IDs: " + ComputerCraft.computerBlockID + ", " + CCTurtle.turtleBlockID); - removeAdvancedTurtle(); + removeAdvancedTurtle();*/ } - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unused" }) private static void removeAdvancedTurtle() { - Iterator iter = CraftingManager.getInstance().getRecipeList().iterator(); + /*Iterator iter = CraftingManager.getInstance().getRecipeList().iterator(); while (iter.hasNext()) { IRecipe recipe = iter.next(); @@ -48,6 +33,6 @@ private static void removeAdvancedTurtle() iter.remove(); } } - } + }*/ } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index 700636d..db7cba9 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -82,7 +82,7 @@ public static void doStuff() } @SuppressWarnings("unchecked") - @RecipeRemoval(requiredModids={"IC2", "gregtech_addon"}, time=EventTime.PLAYER_JOIN) + @RecipeRemoval(requiredModids={"IC2", "gregtech_addon"}, time=EventTime.WORLD_LOAD) public static void removeLater() { String[] blacklist = ConfigurationHandler.removeExtruderInput; Map extruderRecipies; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 6deae41..90bf1af 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -18,6 +18,7 @@ public class MekanismTweaks { + @SuppressWarnings("unchecked") @RecipeRemoval(requiredModids="Mekanism") public static void init() { From 56042a7d3bdd19d5c2db23817892891e77a852c2 Mon Sep 17 00:00:00 2001 From: Johannes13 Date: Wed, 2 Jul 2014 11:55:12 +0200 Subject: [PATCH 21/30] Don't unregister Mek stuff. Valid Oredict Entries are needed to remove them from the GT Extruder. Revert "Remove mekanism processing materials from oreDict" This reverts commit bf3bfbed11227686991c2d3d1a50a70565c9fe2b. --- .../modTweaks/MekanismTweaks.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 90bf1af..f20f76a 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -1,8 +1,6 @@ package tppitweaks.recipetweaks.modTweaks; -import java.lang.reflect.Field; import java.util.ArrayList; -import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.item.Item; @@ -42,41 +40,6 @@ public static void init() { TweakingRegistry.markItemForRecipeRemoval(mekanism.common.Mekanism.machineBlockID, 4, TweakingAction.CHANGED, "Changed to balance better", "with other quarry-like blocks"); } - - //remove all the mekanism 3x/4x materials - try - { - Field f = OreDictionary.class.getDeclaredField("oreIDs"); - f.setAccessible(true); - HashMap temp = (HashMap) f.get(null); - - //remove crystals - temp.remove("crystalIron"); - temp.remove("crystalGold"); - temp.remove("crystalOsmium"); - temp.remove("crystalCopper"); - temp.remove("crystalTin"); - temp.remove("crystalSilver"); - temp.remove("crystalObsidian"); - temp.remove("crystalLead"); - - //remove shards - temp.remove("shardIron"); - temp.remove("shardGold"); - temp.remove("shardOsmium"); - temp.remove("shardCopper"); - temp.remove("shardTin"); - temp.remove("shardSilver"); - temp.remove("shardObsidian"); - temp.remove("shardLead"); - - f.set(null, temp); - } - catch (Throwable t) - { - t.printStackTrace(); - } - } @RecipeAddition(requiredModids="Mekanism") From c748dd0d49fc2b2b7685bce0807555748be9b937 Mon Sep 17 00:00:00 2001 From: Tristen Allen Date: Wed, 2 Jul 2014 11:16:25 -0400 Subject: [PATCH 22/30] Add mekanism 3x items to blacklist also fix minor spelling errors --- src/main/java/tppitweaks/config/ConfigurationHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 75e4033..2f44807 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -134,7 +134,7 @@ public static void init(File file) unnerfPaperRecipe = config.get("Gregtech Tweaks", "unnerfPaperRecipe", true, "Revert GregTech's paper recipe output nerf.").getBoolean(true); readdResinSmelting = config.get("Gregtech Tweaks", "readdResinSmelting", true, "Re-add the IC2 sticky resin to rubber smelting recipe.").getBoolean(true); doCharcoalBlockCompression = config.get("Gregtech Tweaks", "doCharcoalBlockCompression", true, "Charcoal blocks can be compressed to coal via compressor.").getBoolean(true); - removeExtruderInput = config.get("Gregtech Tweaks", "removeExtruderInput", new String[] {"crystalIron", "crystalGold", "crystalOsmium", "crystalCopper", "crystalTin", "crystalSilver", "crystalObsidian", "crystalLead"}, "Disable this Ore Dict items as valid items for the Extruder").getStringList(); + removeExtruderInput = config.get("Gregtech Tweaks", "removeExtruderInput", new String[] {"crystalIron", "crystalGold", "crystalOsmium", "crystalCopper", "crystalTin", "crystalSilver", "crystalObsidian", "crystalLead", "shardIron", "shardGold", "shardOsmium", "shardCopper", "shardTin", "shardSilver", "shardObsidian", "shardLead"}, "Disable these Ore Dict items as valid inputs for the Extruder").getStringList(); showMaricultureGui = config.get("Mod Loading Tweaks", "showMaricultureGUI", false, "Show the mariculture fix GUI on startup.").getBoolean(false); showIRCGui = config.get("Mod Loading Tweaks", "showIRCGui", true, "Show the IRC integration startup GUI").getBoolean(true); From 6600ab96c16e9f3760b43837940dab00c0182b36 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Thu, 3 Jul 2014 17:05:12 -0400 Subject: [PATCH 23/30] Update spawn egg damage for AM2.1. Remove some old code. --- .../recipetweaks/AdditionalTweaks.java | 2 - .../recipetweaks/modTweaks/AM2Tweaks.java | 2 +- .../modTweaks/GregtechTweaks.java | 41 ++++++++------ .../modTweaks/MekanismTweaks.java | 1 - src/main/java/tppitweaks/util/DesktopApi.java | 55 ------------------- 5 files changed, 24 insertions(+), 77 deletions(-) delete mode 100644 src/main/java/tppitweaks/util/DesktopApi.java diff --git a/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java b/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java index 7470277..87bacae 100644 --- a/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/AdditionalTweaks.java @@ -15,8 +15,6 @@ public class AdditionalTweaks { - public static boolean recipesInitialized; - @SuppressWarnings("unchecked") public static void doOreDictTweaks() { diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java index c560a0f..bbf41dd 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java @@ -18,7 +18,7 @@ public static void addRecipes() { TweakingRegistry.addTweakedTooltip(spawnEgg.itemID, spawnEgg.getItemDamage(), TweakingAction.ADDED, "To allow spawning", "of Nature Guardians", "Without killing dryads"); - GameRegistry.addShapedRecipe(spawnEgg, new Object[] { "CCC", "CPC", "CCC", 'C', new ItemStack(am2.items.ItemsCommonProxy.essence, 1, 5), + GameRegistry.addShapedRecipe(spawnEgg, new Object[] { "CCC", "CPC", "CCC", 'C', new ItemStack(am2.items.ItemsCommonProxy.essence, 1, 13), 'P', new ItemStack(am2.blocks.BlocksCommonProxy.aum) }); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index db7cba9..ccf631c 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -13,6 +13,7 @@ import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapelessOreRecipe; +import tppitweaks.TPPITweaks; import tppitweaks.config.ConfigurationHandler; import tterrag.rtc.RecipeAddition; import tterrag.rtc.RecipeAddition.EventTime; @@ -24,9 +25,9 @@ public class GregtechTweaks { - @RecipeRemoval(requiredModids={"IC2", "gregtech_addon"}) + @RecipeRemoval(requiredModids = { "IC2", "gregtech_addon" }) public static void doStuff() - { + { if (ConfigurationHandler.addOsmiumToOreWasher && Loader.isModLoaded("IC2") && !OreDictionary.getOres("dustImpureOsmium").isEmpty() && !OreDictionary.getOres("dustOsmium").isEmpty()) { ic2.core.block.machine.tileentity.TileEntityOreWashing.addRecipe("dustImpureOsmium", 1, 1000, new ItemStack[] { OreDictionary.getOres("dustOsmium").get(0), ic2.core.Ic2Items.stoneDust }); @@ -46,7 +47,7 @@ public static void doStuff() } for (ItemStack s : OreDictionary.getOres("dustZinc")) for (ItemStack s1 : OreDictionary.getOres("ingotZinc")) - GameRegistry.addRecipe(new ShapelessOreRecipe(s, new Object[] { gregtechmod.api.enums.GT_Items.Tool_Mortar_Iron.getWildcard(1L, new Object[0]), s1})); + GameRegistry.addRecipe(new ShapelessOreRecipe(s, new Object[] { gregtechmod.api.enums.GT_Items.Tool_Mortar_Iron.getWildcard(1L, new Object[0]), s1 })); } if (Loader.isModLoaded("gregtech_addon") && Loader.isModLoaded("TConstruct") && ConfigurationHandler.tinkersAluminumPlates) @@ -74,16 +75,17 @@ public static void doStuff() { ItemStack dust = OreDictionary.getOres("dustAluminium").get(0).copy(); dust.stackSize = 2; - gregtechmod.api.GregTech_API.sRecipeAdder.addGrinderRecipe(s, ic2.core.Ic2Items.waterCell, dust, OreDictionary.getOres("dustSmallBauxite").get(0), OreDictionary.getOres("dustSmallBauxite").get(0), - ic2.core.Ic2Items.cell); + gregtechmod.api.GregTech_API.sRecipeAdder.addGrinderRecipe(s, ic2.core.Ic2Items.waterCell, dust, OreDictionary.getOres("dustSmallBauxite").get(0), + OreDictionary.getOres("dustSmallBauxite").get(0), ic2.core.Ic2Items.cell); } } } } @SuppressWarnings("unchecked") - @RecipeRemoval(requiredModids={"IC2", "gregtech_addon"}, time=EventTime.WORLD_LOAD) - public static void removeLater() { + @RecipeRemoval(requiredModids = { "IC2", "gregtech_addon" }, time = EventTime.WORLD_LOAD) + public static void removeLater() + { String[] blacklist = ConfigurationHandler.removeExtruderInput; Map extruderRecipies; ArrayList recipesToRemove = new java.util.ArrayList(); @@ -102,12 +104,12 @@ public static void removeLater() { recipesToRemove.add(entry.getKey()); } } - } - for (Long id : recipesToRemove) { + for (Long id : recipesToRemove) + { extruderRecipies.remove(id); } - System.out.println("Removed " + recipesToRemove.size() + " recipies from the GT Extruder"); + TPPITweaks.logger.info("Removed " + recipesToRemove.size() + " recipies from the GT Extruder"); } catch (Exception e) { @@ -119,16 +121,19 @@ public static void removeLater() { throw new RuntimeException("Exception while removing GT Extruder Recipies", e); } } - - @RecipeAddition(time=EventTime.WORLD_LOAD, requiredModids={"IC2", "gregtech_addon"}) - public static void doPostLoadRecipeAdditions() { - if(ConfigurationHandler.unnerfPaperRecipe) { - TweakingRegistry.addTweakedTooltip(Item.paper.itemID, -1, TweakingAction.ADDED, "Check recipe to ensure 3x output"); - GameRegistry.addShapelessRecipe(new ItemStack(Item.paper, 3), new Object[] {Item.reed, Item.reed, Item.reed}); + + @RecipeAddition(time = EventTime.WORLD_LOAD, requiredModids = { "IC2", "gregtech_addon" }) + public static void doPostLoadRecipeAdditions() + { + if (ConfigurationHandler.unnerfPaperRecipe) + { + TweakingRegistry.addTweakedTooltip(Item.paper.itemID, -1, TweakingAction.ADDED, "Check recipe to ensure 3x output"); + GameRegistry.addShapelessRecipe(new ItemStack(Item.paper, 3), new Object[] { Item.reed, Item.reed, Item.reed }); TETweaks.addRecipes(); - GameRegistry.addRecipe(new ItemStack(Item.paper, 3), new Object[] {"#", "#", "#", '#', Item.reed}); + GameRegistry.addRecipe(new ItemStack(Item.paper, 3), new Object[] { "#", "#", "#", '#', Item.reed }); } - if(ConfigurationHandler.readdResinSmelting) { + if (ConfigurationHandler.readdResinSmelting) + { FurnaceRecipes.smelting().addSmelting(ic2.core.Ic2Items.resin.itemID, ic2.core.Ic2Items.resin.getItemDamage(), ic2.core.Ic2Items.rubber, 0F); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index f20f76a..5ef1000 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -16,7 +16,6 @@ public class MekanismTweaks { - @SuppressWarnings("unchecked") @RecipeRemoval(requiredModids="Mekanism") public static void init() { diff --git a/src/main/java/tppitweaks/util/DesktopApi.java b/src/main/java/tppitweaks/util/DesktopApi.java deleted file mode 100644 index 02af525..0000000 --- a/src/main/java/tppitweaks/util/DesktopApi.java +++ /dev/null @@ -1,55 +0,0 @@ -package tppitweaks.util; - -import java.awt.Desktop; -import java.net.URI; -import java.util.logging.Level; - -import tppitweaks.TPPITweaks; - -public class DesktopApi { - - public static boolean browse(URI uri) { - - if (browseDESKTOP(uri)) - return true; - - return false; - } - - private static boolean browseDESKTOP(URI uri) { - - logOut("Trying to use Desktop.getDesktop().browse() with " - + uri.toString()); - try { - if (!Desktop.isDesktopSupported()) { - logErr("Platform is not supported."); - return false; - } - - if (!Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { - logErr("BORWSE is not supported."); - return false; - } - - Desktop.getDesktop().browse(uri); - - return true; - } catch (Throwable t) { - logErr("Error using desktop browse.", t); - return false; - } - } - - private static void logErr(String msg, Throwable t) { - TPPITweaks.logger.log(Level.SEVERE, msg); - t.printStackTrace(); - } - - private static void logErr(String msg) { - TPPITweaks.logger.log(Level.SEVERE, msg); - } - - private static void logOut(String msg) { - TPPITweaks.logger.log(Level.SEVERE, msg); - } -} \ No newline at end of file From eb1f493232b5a63a7bb83eccdca04406cf646d5e Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sat, 12 Jul 2014 01:25:57 -0400 Subject: [PATCH 24/30] Disable AG Heal Crystal. Closes #74 --- .../tppitweaks/config/ConfigurationHandler.java | 4 +++- src/main/java/tppitweaks/proxy/CommonProxy.java | 17 +---------------- .../modTweaks/AdvancedGeneticsTweaks.java | 5 +++++ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 2f44807..1568c94 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -37,7 +37,8 @@ public class ConfigurationHandler public static boolean buffUnifierRecipe; public static boolean disableAGAutoOutputter; - + public static boolean disableAGHealCrystal; + public static boolean fixExURecipes; public static boolean changeMPSARecipes; public static boolean nerfEnderQuarry; @@ -115,6 +116,7 @@ public static void init(File file) 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); disableAGAutoOutputter = config.get("Other Mod Tweaks", "disableAGAutoOutputter", true, "Remove the recipe for the Advanced Genetics auto output upgrade, because crashes.").getBoolean(true); + disableAGHealCrystal = config.get("Other Mod Tweaks", "disableAGHealCrystal", true, "Remove the recipe for the Advanced Genetics Heal Crystal, disabling this could expose your world to crashes.").getBoolean(true); tweakJABBA = config.get("Other Mod Tweaks", "tweakJABBA", true, "Alter the JABBA barrel recipe to be a little more complicated, leaving FZ barrels as a \"low-tech\" option").getBoolean(true); buffUnifierRecipe = config.get("Other Mod Tweaks", "buffUnifierRecipe", true, "Make the unifier cheaper.").getBoolean(true); makeEIOHardModeEasier = config.get("Other Mod Tweaks", "makeEnderIOHardModeEasier", true, "Give some EnderIO recipes a buff as they are way too diffucult. Currently affects: basic capacitor, reservoir").getBoolean(true); diff --git a/src/main/java/tppitweaks/proxy/CommonProxy.java b/src/main/java/tppitweaks/proxy/CommonProxy.java index 12b3edb..b046dae 100644 --- a/src/main/java/tppitweaks/proxy/CommonProxy.java +++ b/src/main/java/tppitweaks/proxy/CommonProxy.java @@ -1,10 +1,7 @@ package tppitweaks.proxy; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import cpw.mods.fml.common.network.IGuiHandler; -public class CommonProxy implements IGuiHandler +public class CommonProxy { public void initSounds() { @@ -16,18 +13,6 @@ public void initRenderers() } - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - return null; - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - return null; - } - public void initTickHandler() { // Overriden diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java index d720014..e1ed2c8 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java @@ -17,6 +17,11 @@ public static void init() { TweakingRegistry.markItemForRecipeRemoval(com.advGenetics.AdvGenetics.autoOutputUpgrade.itemID, -1, TweakingAction.REMOVED, "Crashes the game"); } + + if (ConfigurationHandler.disableAGHealCrystal) + { + TweakingRegistry.markItemForRecipeRemoval(AdvGenetics.healCrystal.itemID, -1, TweakingAction.REMOVED, "It's a crashaholic"); + } TweakingRegistry.addTweakedTooltip(((Block) AdvGenetics.dnaAnalyser).blockID, -1, TweakingAction.NOTE, "Removed genes:", " - Flight", " - Extra Health"); TweakingRegistry.addTweakedTooltip(((Block) AdvGenetics.dnaEncoder).blockID, -1, TweakingAction.NOTE, "Removed genes:", " - Flight", " - Extra Health"); From 82877fe88483dda767ff59338dd316b610d6357d Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sat, 12 Jul 2014 03:40:06 -0400 Subject: [PATCH 25/30] Fix up messy EnderStorageTweaks. Change around recipes for ES stuff. --- .../config/ConfigurationHandler.java | 10 +- .../modTweaks/EnderStorageTweaks.java | 99 ++++++++++--------- 2 files changed, 59 insertions(+), 50 deletions(-) diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 1568c94..c4cf13a 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -20,10 +20,9 @@ public class ConfigurationHandler public static int materialID; public static int blockID; - public static boolean enderChestResonant; + public static boolean enderChestNerf; public static boolean enderPouchNerf; - public static boolean disableEnderTank; - public static boolean enderTankResonant; + public static boolean enderTankNerf; public static boolean steelReactorCasings; public static boolean glassFuelRods; @@ -100,10 +99,9 @@ public static void init(File file) blockID = config.getBlock("tppiBlockId", 3115).getInt(); materialID = config.getItem("tppiMaterialId", 21651).getInt() - 256; - enderChestResonant = config.get("Ender Storage Tweaks", "enderChestResonant", true, "EnderStorage Ender Chests require resonant strongboxes instead of ender pearls.").getBoolean(true); + enderChestNerf = config.get("Ender Storage Tweaks", "enderChestNerf", true, "EnderStorage Ender Chests require tesseract frames instead of ender pearls.").getBoolean(true); enderPouchNerf = config.get("Ender Storage Tweaks", "enderPouchNerf", true, "EnderStorage Ender Pouches require pyrotheum dust and liquid ender instead of blaze rods and ender pearls.").getBoolean(true); - disableEnderTank = config.get("Ender Storage Tweaks", "disableEnderTank", true, "Disables the ender tank. Setting this to false opens your game/server to dupes, be warned!").getBoolean(true); - enderTankResonant = config.get("Ender Storage Tweaks", "enderTankResonant", true, "EnderStorage Ender Tanks require resonant portable tanks instead of ender pearls.").getBoolean(true); + enderTankNerf = config.get("Ender Storage Tweaks", "enderTankNerf", true, "EnderStorage Ender Tanks require resonant portable tanks instead of ender pearls.").getBoolean(true); steelReactorCasings = config.get("Other Mod Tweaks", "steelReactorCasings", false, "Big Reactors reactor casings require steel. Affects ONLY the casings.").getBoolean(true); ic2TEGlassInterchangeability = config.get("Other Mod Tweaks", "ic2TEGlassInterchangeability", true, "IC2 reinforced glass (glassReinforced) and Thermal Expansion hardened glass (glassHardened)\nwill be cross-registered as each other in the ore dictionary.").getBoolean(false); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index efe68e1..bd75406 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -3,11 +3,13 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import thermalexpansion.item.TEItems; import tppitweaks.config.ConfigurationHandler; import tterrag.rtc.RecipeAddition; import tterrag.rtc.RecipeRemoval; import tterrag.rtc.TweakingRegistry; import codechicken.enderstorage.EnderStorage; +import codechicken.enderstorage.api.EnderStorageManager; import cpw.mods.fml.common.registry.GameRegistry; public class EnderStorageTweaks extends TweakingRegistry @@ -15,71 +17,80 @@ public class EnderStorageTweaks extends TweakingRegistry @RecipeRemoval(requiredModids = { "EnderStorage", "ThermalExpansion" }) public static void init() { - TweakingRegistry.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1, TweakingAction.CHANGED, "Recipe requires resonant strongbox", "because it is better than one", "and requires midgame materials"); if (ConfigurationHandler.enderPouchNerf) - TweakingRegistry.markItemForRecipeRemoval(((Item) codechicken.enderstorage.EnderStorage.itemEnderPouch).itemID, -1, TweakingAction.CHANGED, "Recipe requires pyrotheum+ender bucket", + { + TweakingRegistry.markItemForRecipeRemoval(((Item) EnderStorage.itemEnderPouch).itemID, -1, TweakingAction.CHANGED, "Recipe requires pyrotheum+ender bucket", "so it requires midgame infrastructure"); + } + + for (int i = 0; i < 16; i++) + { + if (ConfigurationHandler.enderChestNerf) + { + TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, EnderStorageManager.getFreqFromColours(i, i, i), TweakingAction.CHANGED, + "Recipe requires tesseract frame", "because it is able to teleport things."); + } + + if (ConfigurationHandler.enderTankNerf) + { + TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, EnderStorageManager.getFreqFromColours(i, i, i) + 4096, TweakingAction.CHANGED, + "Recipe requires resonant tank", "because it is able to teleport things."); + } + } } @RecipeAddition(requiredModids = { "EnderStorage", "ThermalExpansion" }) public static void addRecipes() { - ItemStack chestEnderElement = (ItemStack) (ConfigurationHandler.enderChestResonant ? new ItemStack(thermalexpansion.block.TEBlocks.blockStrongbox, 1, 4) : Item.enderPearl); - ItemStack tankEnderElement = (ItemStack) (ConfigurationHandler.enderTankResonant ? new ItemStack(thermalexpansion.block.TEBlocks.blockTank, 1, 4) : Item.enderPearl); + ItemStack tesseractFrameEmpty = new ItemStack(TEItems.itemComponent, 1, 129); + ItemStack reinforcedTank = new ItemStack(thermalexpansion.block.TEBlocks.blockTank, 1, 4); for (int i = 0; i < 16; i++) { - if (!ConfigurationHandler.disableEnderTank) + // @formatter:off + if (ConfigurationHandler.enderChestNerf) { - TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i), TweakingAction.CHANGED, "Recipe requires resonant tank", "because it is better than one", "and requires midgame materials"); + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, EnderStorageManager.getFreqFromColours(i, i, i)), + "bWb", + "OCO", + "bOb", - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), - "bWb", - "OCO", - "bpb", - - 'b', Item.blazeRod, - 'p', tankEnderElement, - 'O', Block.obsidian, - 'C', Item.cauldron, - 'W', new ItemStack(Block.cloth, 1, i) + 'b', Item.blazeRod, + 'C', tesseractFrameEmpty, + 'O', Block.obsidian, + 'W', new ItemStack(Block.cloth, 1, i) ); - } - else - { - for (int j = 0; j < 16; j++) - { - for (int k = 0; k < 16; k++) - { - TweakingRegistry.markItemForRecipeRemoval(((Block) EnderStorage.blockEnderChest).blockID, 1 << 12 | codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, j, k), TweakingAction.REMOVED, "Has a serious dupe bug."); - } - } } - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), - "bWb", - "OCO", - "bpb", - 'b', Item.blazeRod, - 'p', chestEnderElement, - 'O', Block.obsidian, - 'C', Block.chest, - 'W', new ItemStack(Block.cloth, 1, i) + if (ConfigurationHandler.enderTankNerf) + { + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.blockEnderChest, 1, EnderStorageManager.getFreqFromColours(i, i, i) + 4096), + "OWO", + "bCb", + "bOb", + + 'b', Item.blazeRod, + 'C', reinforcedTank, + 'O', Block.obsidian, + 'p', Item.enderPearl, + 'W', new ItemStack(Block.cloth, 1, i) ); - + } + if (ConfigurationHandler.enderPouchNerf) { - GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.itemEnderPouch, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), - "pWp", - "lel", - "plp", + GameRegistry.addRecipe(new ItemStack(codechicken.enderstorage.EnderStorage.itemEnderPouch, 1, codechicken.enderstorage.api.EnderStorageManager.getFreqFromColours(i, i, i)), + "pep", + "lWl", + "plp", - 'p', thermalexpansion.item.TEItems.dustPyrotheum, - 'l', Item.leather, - 'e', new ItemStack(thermalexpansion.fluid.TEFluids.itemBucket, 1, 2), - 'W', new ItemStack(Block.cloth, 1, i) + 'p', thermalexpansion.item.TEItems.dustPyrotheum, + 'l', Item.leather, + 'e', Item.enderPearl, + 'W', new ItemStack(Block.cloth, 1, i) ); } + // @formatter:on } } } From 7e058c8a864fa5f08997af2f6801297f6b585a77 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Sun, 27 Jul 2014 19:40:54 -0400 Subject: [PATCH 26/30] Add dmCore and new DM recipe. --- src/main/java/tppitweaks/TPPITweaks.java | 6 ++-- .../java/tppitweaks/item/TPPIMaterial.java | 13 ++++--- .../modTweaks/MekanismTweaks.java | 36 +++++++++++++++++-- .../assets/tppitweaks/lang/en_US.lang | 1 + 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/main/java/tppitweaks/TPPITweaks.java b/src/main/java/tppitweaks/TPPITweaks.java index 11ca898..d11b76e 100644 --- a/src/main/java/tppitweaks/TPPITweaks.java +++ b/src/main/java/tppitweaks/TPPITweaks.java @@ -52,9 +52,6 @@ public void preInit(FMLPreInitializationEvent event) ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/TPPI/TPPITweaks.cfg")); CommandTPPI.initValidCommandArguments(); - - ModItems.initItems(); - ModBlocks.initBlocks(); } @EventHandler @@ -62,6 +59,9 @@ public void init(FMLInitializationEvent event) { // AM2SpawnControls.doAM2SpawnControls(); + ModItems.initItems(); + ModBlocks.initBlocks(); + eventHandler = new TPPIEventHandler(); MinecraftForge.EVENT_BUS.register(eventHandler); ModItems.registerRecipes(); diff --git a/src/main/java/tppitweaks/item/TPPIMaterial.java b/src/main/java/tppitweaks/item/TPPIMaterial.java index 63f1b87..66a691b 100644 --- a/src/main/java/tppitweaks/item/TPPIMaterial.java +++ b/src/main/java/tppitweaks/item/TPPIMaterial.java @@ -8,6 +8,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import tppitweaks.TPPITweaks; +import tppitweaks.recipetweaks.modTweaks.MekanismTweaks; +import cpw.mods.fml.common.Loader; public class TPPIMaterial extends Item { @@ -21,16 +23,17 @@ public TPPIMaterial(int par1) { private Icon[] icons; - private String[] unlocNames = {"multicoreProcessor", "multicoreProcessorUncooked", "disassemblerCore", "miningCore"}; + private String[] unlocNames = {"multicoreProcessor", "multicoreProcessorUncooked", "disassemblerCore", "miningCore", "dmCore"}; @Override public void registerIcons(IconRegister par1IconRegister) { - icons = new Icon[4]; + icons = new Icon[5]; icons[0] = par1IconRegister.registerIcon("tppitweaks:tppiProcessor"); icons[1] = par1IconRegister.registerIcon("tppitweaks:tppiProcessorUncooked"); icons[2] = par1IconRegister.registerIcon("tppitweaks:disassemblerCore"); icons[3] = par1IconRegister.registerIcon("tppitweaks:miningCore"); + icons[4] = Loader.isModLoaded("Mekanism") ? MekanismTweaks.getCircuitIcon() : par1IconRegister.registerIcon("not:applicable"); } @Override @@ -41,18 +44,18 @@ public String getUnlocalizedName(ItemStack par1ItemStack) @Override public boolean hasEffect(ItemStack stack) { - return stack.getItemDamage() == 3; + return stack.getItemDamage() >= 3; } @Override public Icon getIconFromDamage(int dmg) { - return icons[dmg]; + return dmg < icons.length ? icons[dmg] : null; } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void getSubItems(int id, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i++) + for (int i = 0; i < 5; i++) list.add(new ItemStack(this.itemID, 1, i)); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 5ef1000..4abdd87 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -2,9 +2,12 @@ import java.util.ArrayList; +import mekanism.common.Mekanism; +import mekanism.common.recipe.MekanismRecipe; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraftforge.oredict.OreDictionary; import tppitweaks.config.ConfigurationHandler; import tppitweaks.item.ModItems; @@ -212,17 +215,46 @@ private static void doMaterialNerfs() private static void doMinerNerf() { - GameRegistry.addRecipe(new mekanism.common.recipe.MekanismRecipe(new ItemStack(mekanism.common.Mekanism.MachineBlock, 1, 4), new Object[]{ + ItemStack clump = new ItemStack(Mekanism.Clump); + GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(ModItems.tppiMaterial, 1, 4), + "012", + "3c4", + "567", + + 'c', Mekanism.ControlCircuit, + '0', setDamage(clump, 0), + '1', setDamage(clump, 1), + '2', setDamage(clump, 2), + '3', setDamage(clump, 3), + '4', setDamage(clump, 4), + '5', setDamage(clump, 5), + '6', setDamage(clump, 6), + '7', setDamage(clump, 7) + )); + + GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(mekanism.common.Mekanism.MachineBlock, 1, 4), new Object[]{ "AcA", "LRL", "MCM", 'A', mekanism.common.Mekanism.AtomicCore, - 'c', mekanism.common.Mekanism.ControlCircuit, + 'c', new ItemStack(ModItems.tppiMaterial, 1, 4), 'L', new ItemStack(mekanism.common.Mekanism.MachineBlock, 1, 15), 'R', mekanism.common.Mekanism.Robit, 'M', new ItemStack(mekanism.common.Mekanism.BasicBlock, 1, 8), 'C', mekanism.common.Mekanism.AtomicDisassembler })); } + + private static ItemStack setDamage(ItemStack stack, int dmg) + { + ItemStack newStack = stack.copy(); + newStack.setItemDamage(dmg); + return newStack; + } + + public static Icon getCircuitIcon() + { + return Mekanism.ControlCircuit.getIconFromDamage(0); + } } diff --git a/src/main/resources/assets/tppitweaks/lang/en_US.lang b/src/main/resources/assets/tppitweaks/lang/en_US.lang index 7421334..052d813 100644 --- a/src/main/resources/assets/tppitweaks/lang/en_US.lang +++ b/src/main/resources/assets/tppitweaks/lang/en_US.lang @@ -7,6 +7,7 @@ tppiGuide.name=TPPI Mod Guide disassemblerCore.name=Disassembly Core miningCore.name=Enderman Mining Assistant tile.redstoneCompressed.name=Compressed Redstone Block +dmCore.name=Embued Control Circuit tppi.splash.text.1=Why didn't you ignore? tppi.splash.text.2=test splash please ignore From 17bc6713d685a53aadbd668c5efcf22df49e5bd1 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Mon, 28 Jul 2014 00:15:23 -0400 Subject: [PATCH 27/30] Add stick -> wood pulp recipe by request --- .../java/tppitweaks/recipetweaks/modTweaks/TETweaks.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java index 1fe95c5..7a47ce7 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java @@ -6,6 +6,7 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import thermalexpansion.util.crafting.FurnaceManager; +import thermalexpansion.util.crafting.PulverizerManager; import tppitweaks.TPPITweaks; import tppitweaks.config.ConfigurationHandler; import tterrag.rtc.RecipeAddition; @@ -52,6 +53,12 @@ public static void addRecipes() { if (OreDictionary.getOres("dustRuby").size() != 0) thermalexpansion.util.crafting.PulverizerManager.addIngotNameToDustRecipe(2400, "gemRuby", OreDictionary.getOres("dustRuby").get(0)); + if (OreDictionary.getOres("dustTinyWood").size() != 0) + { + ItemStack res = OreDictionary.getOres("dustTinyWood").get(0).copy(); + res.stackSize = 2; + PulverizerManager.addIngotNameToDustRecipe(1000, "stickWood", res); + } } public static ItemStack getEnderium() From 62410a87e23c97fc59540ab26fe58e6eb685461b Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Mon, 28 Jul 2014 17:40:26 -0400 Subject: [PATCH 28/30] Remove /tppi prefix from commands and remove some old command code. --- src/main/java/tppitweaks/TPPITweaks.java | 8 +- .../command/CommandGetInvolved.java | 39 +++++ .../java/tppitweaks/command/CommandOres.java | 88 +++++++++++ .../java/tppitweaks/command/CommandTPPI.java | 147 ------------------ 4 files changed, 131 insertions(+), 151 deletions(-) create mode 100644 src/main/java/tppitweaks/command/CommandGetInvolved.java create mode 100644 src/main/java/tppitweaks/command/CommandOres.java delete mode 100644 src/main/java/tppitweaks/command/CommandTPPI.java diff --git a/src/main/java/tppitweaks/TPPITweaks.java b/src/main/java/tppitweaks/TPPITweaks.java index d11b76e..db8279d 100644 --- a/src/main/java/tppitweaks/TPPITweaks.java +++ b/src/main/java/tppitweaks/TPPITweaks.java @@ -6,7 +6,8 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.MinecraftForge; import tppitweaks.block.ModBlocks; -import tppitweaks.command.CommandTPPI; +import tppitweaks.command.CommandGetInvolved; +import tppitweaks.command.CommandOres; import tppitweaks.config.ConfigurationHandler; import tppitweaks.creativeTab.CreativeTabTPPI; import tppitweaks.event.TPPIEventHandler; @@ -50,8 +51,6 @@ public void preInit(FMLPreInitializationEvent event) RecipeTweakingCore.registerPackageName("tppitweaks.recipetweaks.modTweaks"); ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/TPPI/TPPITweaks.cfg")); - - CommandTPPI.initValidCommandArguments(); } @EventHandler @@ -81,6 +80,7 @@ public void postInit(FMLPostInitializationEvent event) @EventHandler public void onFMLServerStart(FMLServerStartingEvent event) { - event.registerServerCommand(new CommandTPPI()); + event.registerServerCommand(new CommandOres()); + event.registerServerCommand(new CommandGetInvolved()); } } diff --git a/src/main/java/tppitweaks/command/CommandGetInvolved.java b/src/main/java/tppitweaks/command/CommandGetInvolved.java new file mode 100644 index 0000000..906a36e --- /dev/null +++ b/src/main/java/tppitweaks/command/CommandGetInvolved.java @@ -0,0 +1,39 @@ +package tppitweaks.command; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; + +public class CommandGetInvolved extends CommandBase +{ + @Override + public String getCommandName() + { + return "getInvolved"; + } + + @Override + public String getCommandUsage(ICommandSender icommandsender) + { + return "/getInvolved"; + } + + @Override + public void processCommand(ICommandSender icommandsender, String[] astring) + { + CommandOres.processVanillaBookCommand("Getting Involved In TPPI", "GetInvolved.txt", icommandsender, astring); + } + + @Override + public int compareTo(Object o) + { + if (o instanceof ICommand) + { + return this.compareTo((ICommand) o); + } + else + { + return 0; + } + } +} diff --git a/src/main/java/tppitweaks/command/CommandOres.java b/src/main/java/tppitweaks/command/CommandOres.java new file mode 100644 index 0000000..d68e7f1 --- /dev/null +++ b/src/main/java/tppitweaks/command/CommandOres.java @@ -0,0 +1,88 @@ +package tppitweaks.command; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import tppitweaks.TPPITweaks; +import tppitweaks.util.TxtParser; + +public class CommandOres extends CommandBase +{ + @Override + public String getCommandName() + { + return "ores"; + } + + @Override + public String getCommandUsage(ICommandSender icommandsender) + { + return "/ores"; + } + + @Override + public boolean canCommandSenderUseCommand(ICommandSender par1iCommandSender) + { + return true; + } + + @SuppressWarnings("rawtypes") + @Override + public List addTabCompletionOptions(ICommandSender command, String[] par2ArrayOfStr) + { + return null; + } + + @Override + public void processCommand(ICommandSender icommandsender, String[] astring) + { + processVanillaBookCommand("TPPI Ore Generation Guide", "OreGen.txt", icommandsender, astring); + } + + public static void processVanillaBookCommand(String title, String textFileName, ICommandSender command, String[] astring) + { + InputStream file = TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/" + textFileName); + List vanillaBookText = file == null ? new ArrayList() : TxtParser.parseFileMain(file); + ItemStack book = new ItemStack(Item.writtenBook); + + book.setTagInfo("author", new NBTTagString("author", "The TPPI Team")); + book.setTagInfo("title", new NBTTagString("title", title)); + + NBTTagCompound nbttagcompound = book.getTagCompound(); + NBTTagList bookPages = new NBTTagList("pages"); + + for (int i = 0; i < vanillaBookText.size(); i++) + { + bookPages.appendTag(new NBTTagString("" + i, vanillaBookText.get(i))); + } + + nbttagcompound.setTag("pages", bookPages); + nbttagcompound.setString("version", TPPITweaks.VERSION); + + if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(book)) + command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0); + + } + + @Override + public int compareTo(Object o) + { + if (o instanceof ICommand) + { + return this.compareTo((ICommand) o); + } + else + { + return 0; + } + } +} diff --git a/src/main/java/tppitweaks/command/CommandTPPI.java b/src/main/java/tppitweaks/command/CommandTPPI.java deleted file mode 100644 index 3e015af..0000000 --- a/src/main/java/tppitweaks/command/CommandTPPI.java +++ /dev/null @@ -1,147 +0,0 @@ -package tppitweaks.command; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.ChatMessageComponent; -import tppitweaks.TPPITweaks; -import tppitweaks.util.TxtParser; - -public class CommandTPPI extends CommandBase -{ - private static HashMap modProperNames = new HashMap(); - private static HashSet validCommands = new HashSet(); - - /** First index is list, rest are mod names **/ - private static ArrayList supportedModsAndList = new ArrayList(); - - public static void initValidCommandArguments() - { - validCommands.add("ores"); - validCommands.add("getInvolved"); - } - - public static void addProperNameMapping(String argName, String properName) - { - modProperNames.put(argName, properName); - } - - private boolean isValidArgument(String s) - { - return validCommands.contains(s); - } - - @Override - public String getCommandName() - { - return "tppi"; - } - - @Override - public String getCommandUsage(ICommandSender icommandsender) - { - return "tppi "; - } - - @Override - public boolean canCommandSenderUseCommand(ICommandSender par1iCommandSender) - { - return true; - } - - @SuppressWarnings("rawtypes") - @Override - public List addTabCompletionOptions(ICommandSender command, String[] par2ArrayOfStr) - { - if (par2ArrayOfStr.length == 1) - { - return getListOfStringsMatchingLastWord(par2ArrayOfStr, validCommands.toArray(new String[validCommands.size()])); - } - else if (par2ArrayOfStr.length == 2) - { - if (par2ArrayOfStr[0].equals("mods")) - return getListOfStringsMatchingLastWord(par2ArrayOfStr, supportedModsAndList.toArray(new String[supportedModsAndList.size()])); - else - return null; - } - else - return null; - } - - @Override - public void processCommand(ICommandSender icommandsender, String[] astring) - { - if (astring.length > 0 && isValidArgument(astring[0])) - { - if (astring[0].equalsIgnoreCase("ores")) - { - processVanillaBookCommand("TPPI Ore Generation Guide", "OreGen.txt", icommandsender, astring); - } - else if (astring[0].equalsIgnoreCase("getInvolved")) - { - processVanillaBookCommand("Getting Involved In TPPI", "GetInvolved.txt", icommandsender, astring); - } - } - else - { - String validCommandString = ""; - Iterator it = validCommands.iterator(); - for (int i = 0; i < validCommands.size(); i++) - { - validCommandString += it.next(); - if (i < validCommands.size() - 1) - validCommandString += ", "; - } - icommandsender.sendChatToPlayer(new ChatMessageComponent().addText("Proper Usage: /tppi ")); - icommandsender.sendChatToPlayer(new ChatMessageComponent().addText("Valid args:")); - icommandsender.sendChatToPlayer(new ChatMessageComponent().addText(validCommandString)); - } - - } - - private void processVanillaBookCommand(String title, String textFileName, ICommandSender command, String[] astring) - { - InputStream file = TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/" + textFileName); - List vanillaBookText = file == null ? new ArrayList() : TxtParser.parseFileMain(file); - ItemStack book = new ItemStack(Item.writtenBook); - - book.setTagInfo("author", new NBTTagString("author", "The TPPI Team")); - book.setTagInfo("title", new NBTTagString("title", title)); - - NBTTagCompound nbttagcompound = book.getTagCompound(); - NBTTagList bookPages = new NBTTagList("pages"); - - for (int i = 0; i < vanillaBookText.size(); i++) - { - bookPages.appendTag(new NBTTagString("" + i, vanillaBookText.get(i))); - } - - nbttagcompound.setTag("pages", bookPages); - nbttagcompound.setString("version", TPPITweaks.VERSION); - - if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(book)) - command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0); - - } - - @Override - public int compareTo(Object o) { - if (o instanceof ICommand) { - return this.compareTo((ICommand) o); - } else { - return 0; - } - } -} From 42883438f48b8c00a3c22b1c5048316ef631580b Mon Sep 17 00:00:00 2001 From: esKaayY Date: Sun, 3 Aug 2014 23:17:25 -0400 Subject: [PATCH 29/30] Update OreGen Book --- .../assets/tppitweaks/lang/OreGen.txt | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/resources/assets/tppitweaks/lang/OreGen.txt b/src/main/resources/assets/tppitweaks/lang/OreGen.txt index c5a40e4..04f53f9 100644 --- a/src/main/resources/assets/tppitweaks/lang/OreGen.txt +++ b/src/main/resources/assets/tppitweaks/lang/OreGen.txt @@ -8,30 +8,30 @@ since you can specifically target ores you want in the world, while still keeping automatic mining and the amount of ores per chunk about the same as normal. ~~~ -Ores in a layer spawn more often close to the center of their -Y ranges (usually a bit lower), unless otherwise stated.~ +Ores spawn at a designated y-level, then have a maximum variance from that mean level. +It will naturally concentrate the ores towards the middle of the range.~ ~ Starting from the top of the world, here are the ores we've tweaked and where you can expect to find them:~ ~~~ Copper:~ ~ -Spawns in the top layers of the world in generous chunks that are centered within the mid 50s, -with the band itself extending about 5-6 blocks in either direction.~ +Spawns in the top layers of the world in generous chunks that are centered at y58, +with the band itself extending about 7 blocks in either direction.~ ~~~ TiC Aluminum:~ ~ Aluminum can be found in small clusters of 3-4 ores -randomly distributed between Y levels 44 and 64.~ +randomly distributed between Y levels 44 and 62.~ ~~~ Iron:~ ~ -Iron is located in large clusters centered in the mid 40s of the world, -and going about 12 blocks in either direction.~ +Iron is located in large clusters centered at y48 of the world, +extending about 13 blocks in either direction.~ ~~~ Tin:~ ~ -This ore spawns in chunks roughly as large as copper's, centered in the mid 30s, -again extending up to 6 blocks in either direction. +This ore spawns in chunks roughly as large as copper's, centered at y37, +again extending up to 7 blocks in either direction. ~~~ Certus Quartz:~ ~ @@ -41,7 +41,7 @@ randomly distributed between levels 36 and 54.~ Lead:~ ~ You can find this ore in large, somewhat sparse clusters in the mid-upper 20s, -plus or minus 6.~ +(y28 to be exact) plus or minus 6 blocks.~ ~~~ Silver:~ ~ @@ -50,28 +50,28 @@ in slightly smaller chunks.~ ~~~ Gold:~ ~ -You can find this ore in sparse, mid-sized chunks centered in the mid teens of the world, -with a variance of 6. Appears up to the 20s, but commonly also near lava.~ +You can find this ore in sparse, mid-sized chunks centered at the 18th y-level of the world, +with a variance of 6.~ ~~~ Osmium:~ ~ -You can find osmium from Mekanism in mid-sized clusters centered in the low to mid teens, -but with a wide variance of 12 blocks in either direction, +You can find osmium from Mekanism in mid-sized clusters centered at y16, +but with a wide variance of 14 blocks in either direction, extending from below lava level up to the silver and lead layers.~ ~~~ Lapis:~ ~ -Lapis can be found centered in the low to mid teens, but it has a high variance of 14, +Lapis can be found centered at y15, but it has a high variance of 14, so it can appear as low as near bedrock and up near silver and lead, with a vein size slightly smaller than diamond.~ ~~~ Redstone:~ ~ -Redstone is spawned in small, 4 ore clusters commonly in the low teens, with a variance of 6, +Redstone is spawned in small, 4 ore clusters commonly in the low teens (y13), with a variance of 6, with some appearing up where gold is, and some also appearing at and below lava.~ ~~~ Magical Crops Essence:~ ~ -You can find this ore in similar areas as redstone +You can find this ore in similar areas as redstone, in rare, mid-large sized chunks of ore. It spawns in the low teens with a variance of 5 blocks.~ ~~~ Diamond:~ @@ -86,7 +86,7 @@ Spawns in mid-sized clusters found randomly between levels 6 and 16.~ Yellorite:~ ~ Spawns in the bottom 9 layers of the world in rare, large chunks of ore. -Dig below lava to find it. Yay!~ +Dig below lava to find it.~ ~~~ Coal:~ ~ From 6c35290b1d578f78655902a03fb64cad32f2dd2b Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Thu, 7 Aug 2014 04:14:21 -0400 Subject: [PATCH 30/30] Update getInvolved and ore books to be more relevant / stylistic --- .../assets/tppitweaks/lang/GetInvolved.txt | 17 +++++++++-------- .../resources/assets/tppitweaks/lang/OreGen.txt | 8 +++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/resources/assets/tppitweaks/lang/GetInvolved.txt b/src/main/resources/assets/tppitweaks/lang/GetInvolved.txt index 7f13839..a76fda7 100644 --- a/src/main/resources/assets/tppitweaks/lang/GetInvolved.txt +++ b/src/main/resources/assets/tppitweaks/lang/GetInvolved.txt @@ -2,19 +2,20 @@ To get involved in TPPI's development, feel free to stop by reddit.com/r/testpac ~ To talk to the dev team directly via IRC, visit #TestPackPleaseIgnore on irc.esper.net.~ ~~~ -The reddit is the place to go to discuss pack features and provide feedback, etc, but NOT report bugs.~ -~ -All bug reports should instead be submitted as issues on the TestPackPleaseIgnore repository, located at github.com/TPPI-Dev. +The subreddit is the place to go to discuss pack features and provide feedback, etc, but NOT report bugs.~ ~~~ -If you want to help out with TPPI Tweaks and/or the in-game mod documentation project, -check out the TPPI-Tweaks github repository.~ +All bug reports should instead be submitted as issues on the TestPackPleaseIgnore repository, located at github.com/TPPI-Dev/TestPackPleaseIgnore/issues.~ ~ -The "SupportedMods.txt" file in our assets folder will let you add documentation. +The in-game mod documentation project can be found under config/modpackTweaks/SupportedMods.txt in the aforementioned repository.~ +~~~ +We have included a guide to contributing at github.com/TPPI-Dev/TestPackPleaseIgnore#contributing. It includes an extensive guide on how to use git to contribute to the project. +~~~ +To contribute to TPPI-Tweaks, Modpack Tweaks, or RecipeTweakingCore, please visit their respective repositories under github.com/TPPI-Dev. ~~~ -Make sure you follow the formatting guidelines outlined at the top of the file when documenting mods, and good luck!~ +Thank you for any and all help in this project. ~ ~ ~ ~ ~ - -Team \ No newline at end of file + - §o"The Developers" \ No newline at end of file diff --git a/src/main/resources/assets/tppitweaks/lang/OreGen.txt b/src/main/resources/assets/tppitweaks/lang/OreGen.txt index 04f53f9..b58ea09 100644 --- a/src/main/resources/assets/tppitweaks/lang/OreGen.txt +++ b/src/main/resources/assets/tppitweaks/lang/OreGen.txt @@ -106,4 +106,10 @@ Unaffected Ores:~ -Thaumcraft Shards~ -Gregtech Ores~ ~~~ -Have fun! \ No newline at end of file +Have fun! +~ +~ +~ +~ +~ + - §o"The Developers" \ No newline at end of file