diff --git a/README.md b/README.md index c2a5bff..4b33d26 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ TPPI-Tweaks =========== Random tweaks and additions for the /r/feedthebeast modpack (TestPackPleaseIgnore) -Builds: http://zone.chill.in/jenkins/job/TPPITweaks/ +Builds: http://ci.tterrag.com/job/TPPI-Tweaks/ diff --git a/build.gradle b/build.gradle index 45b25b9..3b7fb01 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,6 @@ task buildInfo { } else { ext.revision = "GITBORK" } - if (System.getenv().BUILD_NUMBER != null) { ext.buildNum = "${System.getenv().BUILD_NUMBER}" } else { @@ -47,7 +46,8 @@ if (System.getenv().ARTIFACT_VERSION != null) { artifact_version = "${system.getenv().ARTIFACT_VERSION}" } -version = "MC${config.minecraft_version}-${artifact_version}-${System.getenv().BUILD_NUMBER}" +version = "MC${config.minecraft_version}-${artifact_version}-${buildInfo.buildNum}" +def actualVersion = "${artifact_version}-${buildInfo.buildNum}" minecraft { version = "1.6.4-9.11.1.964" @@ -64,7 +64,7 @@ processResources include 'mcmod.info' // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version + expand 'version':actualVersion, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info diff --git a/build.properties b/build.properties index cfc303d..4c972d0 100644 --- a/build.properties +++ b/build.properties @@ -1,3 +1,3 @@ minecraft_version=1.6.4 forge_version=9.11.1.964 -mod_version=1.0.0 \ No newline at end of file +mod_version=1.1.0 \ No newline at end of file diff --git a/src/main/java/tppitweaks/TPPITweaks.java b/src/main/java/tppitweaks/TPPITweaks.java index aad1451..765cac9 100644 --- a/src/main/java/tppitweaks/TPPITweaks.java +++ b/src/main/java/tppitweaks/TPPITweaks.java @@ -3,7 +3,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.util.logging.Level; import java.util.logging.Logger; import net.minecraft.creativetab.CreativeTabs; @@ -18,6 +17,7 @@ import tppitweaks.lib.Reference; import tppitweaks.proxy.CommonProxy; import tppitweaks.proxy.PacketHandler; +import tppitweaks.recipetweaks.RecipeAddition.EventTime; import tppitweaks.recipetweaks.RecipeTweaks; import tppitweaks.util.FileLoader; import tppitweaks.util.TPPIPlayerTracker; @@ -37,11 +37,11 @@ @NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class) public class TPPITweaks { - public static final String VERSION = "1.0.0"; + public static final String VERSION = "1.1.0"; @Instance("TPPITweaks") public static TPPITweaks instance; - + @SidedProxy(clientSide = "tppitweaks.proxy.ClientProxy", serverSide = "tppitweaks.proxy.CommonProxy") public static CommonProxy proxy; @@ -51,31 +51,26 @@ public class TPPITweaks public static final Logger logger = Logger.getLogger("TPPITweaks"); public static CreativeTabTPPI creativeTab = new CreativeTabTPPI(CreativeTabs.getNextID()); - + @EventHandler - public void preInit(FMLPreInitializationEvent event) { - - logger.setParent(FMLCommonHandler.instance().getFMLLogger()); + public void preInit(FMLPreInitializationEvent event) + { + logger.setParent(FMLCommonHandler.instance().getFMLLogger()); - ConfigurationHandler.init(new File(event.getModConfigurationDirectory() - .getAbsolutePath() + "/TPPI/TPPITweaks.cfg")); + 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()); try { - ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); + FileLoader.init(ConfigurationHandler.cfg, 0); } - catch (FileNotFoundException e) + catch (IOException e) { - logger.log(Level.WARNING, "TPPI Changelog not found, please check the TPPI config folder."); + e.printStackTrace(); } - + + ConfigurationHandler.loadGuideText(FileLoader.getGuideText()); + ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); + CommandTPPI.initValidCommandArguments(FileLoader.getSupportedModsFile()); ModItems.initItems(); @@ -89,26 +84,35 @@ public void preInit(FMLPreInitializationEvent event) { @EventHandler public void init(FMLInitializationEvent event) { - AM2SpawnControls.doAM2SpawnControls(); + // AM2SpawnControls.doAM2SpawnControls(); eventHandler = new TPPIEventHandler(); MinecraftForge.EVENT_BUS.register(eventHandler); ModItems.registerRecipes(); ModBlocks.registerRecipes(); - + if (event.getSide().isClient()) proxy.initTickHandler(); + + tweakAtEvent(EventTime.INIT); } @EventHandler public void postInit(FMLPostInitializationEvent event) { - RecipeTweaks.doPostInitRecipeTweaks(); - if (FMLCommonHandler.instance().getSide().isClient()) { - GuiHelper.initMap(); + try + { + GuiHelper.initMap(); + } + catch (FileNotFoundException e) + { + e.printStackTrace(); + } } + + tweakAtEvent(EventTime.POST_INIT); } @EventHandler @@ -116,4 +120,14 @@ 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/block/ModBlocks.java b/src/main/java/tppitweaks/block/ModBlocks.java index 920dd67..2ad29e5 100644 --- a/src/main/java/tppitweaks/block/ModBlocks.java +++ b/src/main/java/tppitweaks/block/ModBlocks.java @@ -4,6 +4,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; import tppitweaks.config.ConfigurationHandler; import cpw.mods.fml.common.registry.GameRegistry; @@ -17,6 +18,9 @@ public static void initBlocks() { } public static void registerRecipes() { + + OreDictionary.registerOre("blockCompressedRedstone", tppiBlock); + if(OreDictionary.getOres("blockRedstone").isEmpty()) { GameRegistry.addShapedRecipe(new ItemStack(tppiBlock), @@ -40,6 +44,8 @@ public static void registerRecipes() { })); } + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.blockRedstone, 9), "blockCompressedRedstone")); } } diff --git a/src/main/java/tppitweaks/client/gui/GuiHelper.java b/src/main/java/tppitweaks/client/gui/GuiHelper.java index 6771561..5a414a4 100644 --- a/src/main/java/tppitweaks/client/gui/GuiHelper.java +++ b/src/main/java/tppitweaks/client/gui/GuiHelper.java @@ -1,5 +1,7 @@ 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; @@ -26,7 +28,7 @@ public static void doGuideGUI() Minecraft.getMinecraft().displayGuiScreen(new GuiGuideBase()); } - public static void initMap() + public static void initMap() throws FileNotFoundException { GuiGuideBase.initMap(); } diff --git a/src/main/java/tppitweaks/client/gui/MaricultureGui.java b/src/main/java/tppitweaks/client/gui/MaricultureGui.java index 716d212..e378fe1 100644 --- a/src/main/java/tppitweaks/client/gui/MaricultureGui.java +++ b/src/main/java/tppitweaks/client/gui/MaricultureGui.java @@ -1,9 +1,9 @@ package tppitweaks.client.gui; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.util.FileLoader; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; +import tppitweaks.config.ConfigurationHandler; +import tppitweaks.util.FileLoader; public class MaricultureGui extends GuiScreen { @@ -55,7 +55,7 @@ protected void actionPerformed(GuiButton button) this.mc.displayGuiScreen(null); break; case 4: - ConfigurationHandler.manuallyChangeConfigValue("B:showMaricultureGUI", "true", "false"); + ConfigurationHandler.manuallyChangeConfigValue("B:showMaricultureGUI", "true", "false"); this.mc.displayGuiScreen(null); break; default: diff --git a/src/main/java/tppitweaks/command/CommandTPPI.java b/src/main/java/tppitweaks/command/CommandTPPI.java index 28d2e0a..f12ac20 100644 --- a/src/main/java/tppitweaks/command/CommandTPPI.java +++ b/src/main/java/tppitweaks/command/CommandTPPI.java @@ -283,15 +283,8 @@ private void giveModBook(String modName, ICommandSender command) NBTTagList bookPages = new NBTTagList("pages"); ArrayList pages; - //try - //{ - pages = TxtParser.parseFileMods(FileLoader.getSupportedModsFile(), modName + ", " + properName); - /*} - catch (FileNotFoundException e) - { - pages = new ArrayList(); - e.printStackTrace(); - }*/ + + pages = TxtParser.parseFileMods(FileLoader.getSupportedModsFile(), modName + ", " + properName); if (pages.get(0).startsWith("<") && pages.get(0).endsWith("> ")) { @@ -320,4 +313,10 @@ public int compareTo(Object arg0) { return this.compareTo((ICommand) arg0); } + + @Override + public boolean equals(Object obj) + { + return this.compareTo(obj) == 0; + } } diff --git a/src/main/java/tppitweaks/config/ConfigurationHandler.java b/src/main/java/tppitweaks/config/ConfigurationHandler.java index 2f7b82b..0268d51 100644 --- a/src/main/java/tppitweaks/config/ConfigurationHandler.java +++ b/src/main/java/tppitweaks/config/ConfigurationHandler.java @@ -34,12 +34,15 @@ public class ConfigurationHandler public static boolean enderTankTesseract; public static boolean steelReactorCasings; public static boolean glassFuelRods; + public static boolean twoReactorGlass; public static boolean eloraamBreakersAndDeployers; public static boolean ic2TEGlassInterchangeability; public static boolean tweakDA; public static boolean tweakSFM; public static boolean tweakAM2; - + public static boolean tweakJABBA; + public static boolean buffUnifierRecipe; + public static boolean disableAGAutoOutputter; public static boolean fixExURecipes; @@ -57,7 +60,9 @@ public class ConfigurationHandler public static boolean unnerfPaperRecipe; public static boolean readdResinSmelting; public static boolean doCharcoalBlockCompression; - + public static boolean makeEIOHardModeEasier; + public static boolean unregisterFusedQuartz; + public static boolean addEssenceSeedRecipe; public static boolean harderActivatorRecipe; @@ -65,6 +70,7 @@ public class ConfigurationHandler public static boolean disableCardboardBox; public static boolean disableMiner; public static boolean nerfMiner; + public static boolean disableUniversalCables; public static boolean harderLillipadRecipe; @@ -77,6 +83,7 @@ public class ConfigurationHandler public static boolean showDownloadGUI; public static boolean showMaricultureGui; + public static boolean doSpawnBook; public static boolean autoEnableTT; @@ -104,30 +111,35 @@ public static void init(File file) blockID = config.getBlock("tppiBlockId", 3115).getInt(); - bookID = config.getItem("tppiBookId", 21000).getInt() - 256; - materialID = config.getItem("tppiMaterialId", 21001).getInt() - 256; + 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); + 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); - steelReactorCasings = config.get("Other Mod Tweaks", "steelReactorCasings", true, "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(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); tweakDA = config.get("Other Mod Tweaks", "tweakDARecipe", true, "Make Dimensional Anchors' recipe closer to that of a chicken chunks chunk loader.").getBoolean(true); tweakSFM = config.get("Other Mod Tweaks", "stevesFactoryManagerAERecipes", true, "Recipes from Steve's Factory Manager take items from Applied Energistics.").getBoolean(true); tweakAM2 = config.get("Other Mod Tweaks", "addAM2NatureGuardianRecipe", true, "Add recipe for Ars Magica 2 Nature Guardian spawn egg. Useful when dryads are disabled.").getBoolean(true); - glassFuelRods = config.get("Other Mod Tweaks", "glassFuelRods", true, "Big Reactors fuel rods take just a touch of reactor glass.").getBoolean(true); + glassFuelRods = config.get("Other Mod Tweaks", "glassFuelRods", false, "Big Reactors fuel rods take just a touch of reactor glass.").getBoolean(false); + twoReactorGlass = config.get("Other Mod Tweaks", "twoReactorGlass", true, "Big Reactors\' reactor glass recipe gives two reactor glass in exchange for the harder recipe.").getBoolean(true); eloraamBreakersAndDeployers = config.get("Other Mod Tweaks", "eloraamBreakersAndDeployers", true, "OpenBlocks block breakers and placers have the same recipes as Redpower 2's.").getBoolean(true); removeStupidEnergyCrystalRecipe = config.get("Other Mod Tweaks", "removeDartCraftEnergyCrystalRecipe", true, "Remove DartCraft's IC2 energy crystal recipe.").getBoolean(true); disableForceShears = config.get("Other Mod Tweaks", "disableForceShears", true, "Remove the force shears recipe because they were crashing servers rarely, but in a serious way. Disable this at your own risk.").getBoolean(true); - disableAGAutoOutputter = config.get("Other Mod Tweaks", "disableAGAutoOutputter", true, "Remove the recipe for the Advanced Genetics auto output upgrade, because 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); + unregisterFusedQuartz = config.get("Other Mod Tweaks", "unregisterFusedQuartz", true, "Having fused quartz be registered under hardened glass doesn't make much sense. This fixes that.").getBoolean(true); fixExURecipes = config.get("ExtraUtils Tweaks", "fixExtraUtilsRecipes", true, "Current version of ExU has broken recipes for the unstable ingot block. This fixes that.").getBoolean(true); nerfEnderQuarry = config.get("ExtraUtils Tweaks", "nerfEnderQuarry", true, "Make the Extra Utilities ender quarry expensive.").getBoolean(true); @@ -144,19 +156,20 @@ 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", true, "Show the Download GUI on startup.").getBoolean(true); - showMaricultureGui = config.get("Mod Loading Tweaks", "showMaricultureGUI", true, "Show the mariculture fix GUI on startup.").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); + registerMagicalCropsOre = config.get("Other Mod Tweaks", "registerMagicalCropsOre", true, "Register essence ores from Magical Crops in the ore dictionary under \"oreMCropsEssence\" and \"oreMCropsNetherEssence\".").getBoolean(true); harderActivatorRecipe = config.get("Other Mod Tweaks", "harderActivatorRecipe", true, "Make the autonomous activator recipe slightly harder").getBoolean(true); harderLillipadRecipe = config.get("Other Mod Tweaks", "harderLillipadOfFertility", true, "Make the lillipad of fertility much harder to craft").getBoolean(true); - addEssenceSeedRecipe = config.get("Other Mod Tweaks", "addEssenceSeedRecipe", true, "Add a recipe for the essence seeds in magical crops").getBoolean(true); + addEssenceSeedRecipe = config.get("Other Mod Tweaks", "addEssenceSeedRecipe", false, "Add a recipe for the essence seeds in magical crops").getBoolean(false); addOsmiumToOreWasher = config.get("Mekanism Tweaks", "addOsmiumToOreWasher", true, "Add a recipe for impure osmium dust to clean osmium dust in the IC2 ore washer.").getBoolean(true); harderDisassemblerRecipe = config.get("Mekanism Tweaks", "harderAtomicDisassembler", true, "Makes the recipe for the Atomic Disassembler much more difficult").getBoolean(true); - disableCardboardBox = config.get("Mekanism Tweaks", "disableCardboardBox", true, "Remove the recipe for the cardboard box (it can move ANY tile entity including nodes and spanwers)").getBoolean(true); + disableCardboardBox = config.get("Mekanism Tweaks", "disableCardboardBox", false, "Remove the recipe for the cardboard box (it can move ANY tile entity including nodes and spanwers)").getBoolean(false); disableMiner = config.get("Mekanism Tweaks", "disableDigitalMiner", false, "Remove the recipe for the digital miner (not really any reason to do this now but I'm not deleting code)").getBoolean(false); 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); @@ -165,7 +178,7 @@ public static void init(File file) Reference.KAMIFilename = config.get("Mod Loading Tweaks", "KAMI_filename", Reference.DEFAULT_KAMI_FILENAME, "The filename for KAMI to use to check for its presence and disable/enable it automatically").getString(); Reference.packName = config.get("Pack Info", "packName", "Test Pack Please Ignore", "The full name of the pack").getString(); - Reference.packVersion = config.get("Pack Info", "packVerison", "0.0.1", "The version of the pack").getString(); + Reference.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); diff --git a/src/main/java/tppitweaks/event/TPPIEventHandler.java b/src/main/java/tppitweaks/event/TPPIEventHandler.java index ffff947..76c4e44 100644 --- a/src/main/java/tppitweaks/event/TPPIEventHandler.java +++ b/src/main/java/tppitweaks/event/TPPIEventHandler.java @@ -8,18 +8,24 @@ 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.MaricultureGui; 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; @@ -181,11 +187,26 @@ 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)) + { + 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) - RecipeTweaks.doPlayerJoinRecipeTweaks(); + { + TPPITweaks.tweakAtEvent(EventTime.PLAYER_JOIN); + RecipeTweaks.recipesInitialized = true; + } } } \ No newline at end of file diff --git a/src/main/java/tppitweaks/item/ModItems.java b/src/main/java/tppitweaks/item/ModItems.java index f810973..96a36ef 100644 --- a/src/main/java/tppitweaks/item/ModItems.java +++ b/src/main/java/tppitweaks/item/ModItems.java @@ -14,14 +14,23 @@ public class ModItems { public static TPPIMaterial tppiMaterial; public static void initItems() { - tppiBook = new TPPIBook(ConfigurationHandler.bookID); - tppiMaterial = new TPPIMaterial(ConfigurationHandler.materialID); + if (ConfigurationHandler.bookID != 0) + { + tppiBook = new TPPIBook(ConfigurationHandler.bookID); + GameRegistry.registerItem(tppiBook, "tppiBook"); + } + + 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[] { @@ -37,5 +46,4 @@ public static void registerRecipes() FurnaceRecipes.smelting().addSmelting(tppiMaterial.itemID, 1, new ItemStack(tppiMaterial), 0.1f); } } - } diff --git a/src/main/java/tppitweaks/item/TPPIBook.java b/src/main/java/tppitweaks/item/TPPIBook.java index ef35593..fb47b73 100644 --- a/src/main/java/tppitweaks/item/TPPIBook.java +++ b/src/main/java/tppitweaks/item/TPPIBook.java @@ -1,6 +1,5 @@ package tppitweaks.item; -import java.io.FileNotFoundException; import java.util.List; import net.minecraft.client.renderer.texture.IconRegister; @@ -18,6 +17,7 @@ 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; @@ -86,7 +86,7 @@ public ItemStack addTextToBook(ItemStack book, int damage) switch (damage) { - case 0: + case 0: book.setTagInfo("title", new NBTTagString("title", ConfigurationHandler.bookTitle)); nbttagcompound = book.getTagCompound(); @@ -109,12 +109,7 @@ public ItemStack addTextToBook(ItemStack book, int damage) if (ConfigurationHandler.changelog == null) { - try { - ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText()); } for (int i = 0; i < ConfigurationHandler.changelog.size(); i++) @@ -132,11 +127,13 @@ public ItemStack addTextToBook(ItemStack book, int damage) 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); } diff --git a/src/main/java/tppitweaks/lib/Reference.java b/src/main/java/tppitweaks/lib/Reference.java index 402f615..c01e957 100644 --- a/src/main/java/tppitweaks/lib/Reference.java +++ b/src/main/java/tppitweaks/lib/Reference.java @@ -39,7 +39,11 @@ public class Reference + "required-after:NotEnoughItems;" + "after:Railcraft;" + "after:advancedgenetics;" - + "after:IC2"; + + "after:IC2;" + + "after:factorization;" + + "after:MineFactoryReloaded;" + + "after:JABBA;" + + "after:EnderIO"; public static String packName = "Test Pack Please Ignore"; public static String packVersion = "0.2.2"; diff --git a/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java b/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java new file mode 100644 index 0000000..7d5b58e --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/RecipeAddition.java @@ -0,0 +1,26 @@ +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 new file mode 100644 index 0000000..db30366 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/RecipeRemoval.java @@ -0,0 +1,19 @@ +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 index 8952aab..f406e9f 100644 --- a/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/RecipeTweaks.java @@ -1,290 +1,169 @@ package tppitweaks.recipetweaks; -import java.util.HashSet; +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.ListIterator; +import java.util.Set; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapelessOreRecipe; -import tppitweaks.config.ConfigurationHandler; -import tppitweaks.recipetweaks.modTweaks.AM2Tweaks; -import tppitweaks.recipetweaks.modTweaks.AdvancedGeneticsTweaks; -import tppitweaks.recipetweaks.modTweaks.BigReactorsTweaks; -import tppitweaks.recipetweaks.modTweaks.DATweaks; -import tppitweaks.recipetweaks.modTweaks.DCTweaks; -import tppitweaks.recipetweaks.modTweaks.EnderStorageTweaks; -import tppitweaks.recipetweaks.modTweaks.ExUTweaks; -import tppitweaks.recipetweaks.modTweaks.GregtechTweaks; -import tppitweaks.recipetweaks.modTweaks.IC2Tweaks; -import tppitweaks.recipetweaks.modTweaks.MPSATweaks; -import tppitweaks.recipetweaks.modTweaks.MagicropsAndIC2Tweaks; -import tppitweaks.recipetweaks.modTweaks.MagicropsAndTETweaks; -import tppitweaks.recipetweaks.modTweaks.MagicropsTweaks; -import tppitweaks.recipetweaks.modTweaks.MekanismTweaks; -import tppitweaks.recipetweaks.modTweaks.OpenBlocksTweaks; -import tppitweaks.recipetweaks.modTweaks.RailcraftTweaks; -import tppitweaks.recipetweaks.modTweaks.ReliquaryTweaks; -import tppitweaks.recipetweaks.modTweaks.SFMTweaks; -import tppitweaks.recipetweaks.modTweaks.TETweaks; -import tppitweaks.recipetweaks.modTweaks.TweakerBase; +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; - private static boolean okayToTweakIC2; - private static boolean okayToTweakGT; - private static boolean okayToTweakEnderStorage; - private static boolean okayToTweakBigReactors; - private static boolean okayToTweakDA; - private static boolean okayToTweakSFM; - private static boolean okayToTweakOpenBlocks; - private static boolean okayToTweakAM2; - private static boolean okayToTweakMagicalCrops; - private static boolean okayToTweakDartCraft; - private static boolean okayToTweakExU; - private static boolean okayToTweakMPSA; - private static boolean okayToTweakMekanism; - private static boolean okayToTweakTE; - private static boolean okayToTweakReliquary; - private static boolean okayToTweakAdvancedGenetics; - private static boolean okayToTweakRailcraft; - - public static void doPostInitRecipeTweaks() - { - recipesInitialized = false; - - checkWhatWeCanTweak(); - initRemovableRecipesMap(); - - if (okayToTweakGT) - GregtechTweaks.doStuff(); - - if (okayToTweakExU && ConfigurationHandler.fixExURecipes) - ExUTweaks.fixRecipes(); - - doOreDictTweaks(); - - if (okayToTweakIC2) { - IC2Tweaks.registerOres(); - IC2Tweaks.addRecipes(); - } - - if (okayToTweakMagicalCrops) - MagicropsTweaks.registerOres(); - - removeSomeRecipes(); - addRevisedRecipes(); - } - - public static void doPlayerJoinRecipeTweaks() + @SuppressWarnings("unchecked") + private static void doOreDictTweaks() { - if (okayToTweakGT) - { - GregtechTweaks.addRecipes(); - } - if (okayToTweakExU) + // cross registering alumin(um/ium) + for (ItemStack s : OreDictionary.getOres("dustAluminium")) { - ExUTweaks.reAddRecipeAfterLoad(); + OreDictionary.registerOre("dustAluminum", s); } - if (okayToTweakRailcraft) + + // fixing zinc smelting + List dirtyZincs = OreDictionary.getOres("dustImpureZinc"); + for (ItemStack stack : dirtyZincs) { - RailcraftTweaks.registerOres(); + ItemStack newStack = stack.copy(); + for (ItemStack stack1 : OreDictionary.getOres("ingotZinc")) + FurnaceRecipes.smelting().addSmelting(newStack.itemID, newStack.getItemDamage(), stack1.copy(), 0.1F); } - if (okayToTweakIC2) + + // fixing fused quartz + try { - IC2Tweaks.doPostLoadRecipeAdditions(); + 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); } - recipesInitialized = true; - } - - @SuppressWarnings({ "unchecked" }) - private static void removeSomeRecipes() - { - ListIterator iterator = CraftingManager.getInstance().getRecipeList().listIterator(); - while (iterator.hasNext()) + catch (Throwable t) { - IRecipe r = iterator.next(); - if (canRemoveRecipe(r)) - { - iterator.remove(); - } + TPPITweaks.logger.severe("Fixing EnderIO via reflection failed!"); + t.printStackTrace(); } } - - private static void checkWhatWeCanTweak() + + private static void addMiscRecipes() { - okayToTweakIC2 = Loader.isModLoaded("IC2"); - okayToTweakGT = Loader.isModLoaded("gregtech_addon"); - okayToTweakEnderStorage = Loader.isModLoaded("EnderStorage") && Loader.isModLoaded("ThermalExpansion"); - okayToTweakBigReactors = Loader.isModLoaded("BigReactors") && !OreDictionary.getOres("ingotSteel").isEmpty() - && (ConfigurationHandler.steelReactorCasings || ConfigurationHandler.glassFuelRods); - okayToTweakDA = Loader.isModLoaded("DimensionalAnchors") && ConfigurationHandler.tweakDA; - okayToTweakSFM = Loader.isModLoaded("AppliedEnergistics") && Loader.isModLoaded("StevesFactoryManager") && ConfigurationHandler.tweakSFM; - okayToTweakOpenBlocks = Loader.isModLoaded("OpenBlocks") && ConfigurationHandler.eloraamBreakersAndDeployers; - okayToTweakAM2 = Loader.isModLoaded("arsmagica2") && ConfigurationHandler.tweakAM2; - okayToTweakMagicalCrops = Loader.isModLoaded("magicalcrops"); - okayToTweakDartCraft = Loader.isModLoaded("DartCraft") && ConfigurationHandler.removeStupidEnergyCrystalRecipe; - okayToTweakExU = Loader.isModLoaded("ExtraUtilities"); - okayToTweakMPSA = Loader.isModLoaded("powersuitaddons") && ConfigurationHandler.changeMPSARecipes; - okayToTweakMekanism = Loader.isModLoaded("Mekanism"); - okayToTweakTE = Loader.isModLoaded("ThermalExpansion"); - okayToTweakReliquary = Loader.isModLoaded("xreliquary") && ConfigurationHandler.harderLillipadRecipe; - okayToTweakAdvancedGenetics = Loader.isModLoaded("advancedgenetics"); - okayToTweakRailcraft = Loader.isModLoaded("Railcraft"); + GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint})); } - - private static void initRemovableRecipesMap() + + public static void removeRecipes() { - /* - * Value -1 for key means no metadata sensitivity. Value = metadata for - * metadata sensitivity. - */ - - if (okayToTweakEnderStorage) - { - EnderStorageTweaks.init(); - } - if (okayToTweakBigReactors) - { - BigReactorsTweaks.init(); - } - if (okayToTweakDA) - { - DATweaks.init(); - } - if (okayToTweakSFM) - { - SFMTweaks.init(); - } - if (okayToTweakOpenBlocks) - { - OpenBlocksTweaks.init(); - } - if (Loader.isModLoaded("ExtraUtilities")) - { - ExUTweaks.init(); - } - if (okayToTweakAdvancedGenetics) - { - AdvancedGeneticsTweaks.init(); - } - if (okayToTweakDartCraft) - { - DCTweaks.init(); - } - if (okayToTweakIC2) - { - IC2Tweaks.init(); - } - if (okayToTweakMPSA) - { - MPSATweaks.init(); - } - if (okayToTweakMekanism) + try { - MekanismTweaks.init(); + 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); + System.out.println(c.getName() + " : " + m.getName() + " : " + Arrays.deepToString(m.getDeclaredAnnotations())); + if (r != null && allModsLoaded(r.requiredModids())) + { + m.invoke(null, new Object[]{}); + } + } + } } - if (okayToTweakTE && ConfigurationHandler.harderActivatorRecipe) + catch (Throwable t) { - TETweaks.init(); + TPPITweaks.logger.severe("Could not perform recipe removals. This is a serious error!"); + t.printStackTrace(); + throw new RuntimeException("Recipe tweaks failed."); } - if (okayToTweakMagicalCrops) + + TweakingRegistry.removeRecipes(); + } + + public static void addRecipes(EventTime time) + { + try { - MagicropsTweaks.init(); + 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) + { + m.invoke(null, new Object[]{}); + } + } + } } - if (okayToTweakReliquary) + catch (Throwable t) { - ReliquaryTweaks.init(); + TPPITweaks.logger.severe("Could not perform recipe additions. This is a serious error!"); + t.printStackTrace(); + throw new RuntimeException("Recipe tweaks failed."); } } - - private static boolean canRemoveRecipe(IRecipe r) + + private static Method[] loadClassSafe(ClassInfo c) { try { - ItemStack output = r.getRecipeOutput(); - HashSet validMetas = TweakerBase.getDamageValuesToRemove(output.itemID); - return validMetas.contains(-1) || validMetas.contains(output.getItemDamage()); + Class clazz = c.load(); + return clazz.getDeclaredMethods(); } - catch (Throwable e) + catch (Throwable t) { - return false; + TPPITweaks.logger.info(String.format("Class %s threw an error, skipping...", c.getName())); + return new Method[]{}; } } - - private static void addRevisedRecipes() - { - - if (okayToTweakEnderStorage) - EnderStorageTweaks.addRecipes(); - - if (okayToTweakBigReactors) - BigReactorsTweaks.addRecipes(); - - if (okayToTweakDA) - DATweaks.addRecipes(); - - if (okayToTweakSFM) - SFMTweaks.addRecipes(); - - if (okayToTweakOpenBlocks) - OpenBlocksTweaks.addRecipes(); - - if (okayToTweakAM2) - AM2Tweaks.addRecipes(); - - if (okayToTweakMPSA) - MPSATweaks.addRecipes(); - - if (okayToTweakMekanism && ConfigurationHandler.harderDisassemblerRecipe) - MekanismTweaks.addRecipes(); - - if (okayToTweakTE && ConfigurationHandler.harderActivatorRecipe) - TETweaks.addRecipes(); - - if (okayToTweakMagicalCrops) - MagicropsTweaks.addRecipes(); - - if (okayToTweakMagicalCrops && okayToTweakIC2) - MagicropsAndIC2Tweaks.addRecipes(); - - if (okayToTweakMagicalCrops && okayToTweakTE) - MagicropsAndTETweaks.addRecipes(); - - if (okayToTweakReliquary) - ReliquaryTweaks.addRecipes(); - - if (okayToTweakExU) - ExUTweaks.addRecipes(); - - GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint})); - } - - /** - * Adds aluminIUM oreDict registries to aluminUM as well - */ - private static void doOreDictTweaks() + + public static void doRemainingTweaks(EventTime time) { - for (ItemStack s : OreDictionary.getOres("dustAluminium")) + switch(time) { - OreDictionary.registerOre("dustAluminum", s); + case INIT: + addMiscRecipes(); + break; + case POST_INIT: + doOreDictTweaks(); + break; + default: + break; } - - List dirtyZincs = OreDictionary.getOres("dustImpureZinc"); - for (ItemStack stack : dirtyZincs) + } + + private static boolean allModsLoaded(String[] modids) + { + for (String s : modids) { - ItemStack newStack = stack.copy(); - for (ItemStack stack1 : OreDictionary.getOres("ingotZinc")) - FurnaceRecipes.smelting().addSmelting(newStack.itemID, newStack.getItemDamage(), stack1.copy(), 0.1F); + 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 new file mode 100644 index 0000000..030e3f6 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/TweakingRegistry.java @@ -0,0 +1,125 @@ +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:"); + + 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 23b363c..367a81f 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AM2Tweaks.java @@ -1,13 +1,25 @@ package tppitweaks.recipetweaks.modTweaks; import net.minecraft.item.ItemStack; +import tppitweaks.config.ConfigurationHandler; +import tppitweaks.recipetweaks.RecipeAddition; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class AM2Tweaks { + @RecipeAddition(requiredModids="AM2") public static void addRecipes() { - GameRegistry.addShapedRecipe(new ItemStack(am2.items.ItemsCommonProxy.spawnEgg, 1, 12), new Object[] { "CCC", "CPC", "CCC", 'C', new ItemStack(am2.items.ItemsCommonProxy.essence, 1, 5), 'P', - new ItemStack(am2.blocks.BlocksCommonProxy.aum) }); + ItemStack spawnEgg = new ItemStack(am2.items.ItemsCommonProxy.spawnEgg, 1, 12); + + if (ConfigurationHandler.tweakAM2) + { + 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), + 'P', new ItemStack(am2.blocks.BlocksCommonProxy.aum) }); + } } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java index 3f04979..bbf55ca 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/AdvancedGeneticsTweaks.java @@ -1,12 +1,17 @@ package tppitweaks.recipetweaks.modTweaks; import tppitweaks.config.ConfigurationHandler; +import tppitweaks.recipetweaks.RecipeRemoval; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; public class AdvancedGeneticsTweaks { + @RecipeRemoval(requiredModids="advancedgenetics") public static void init() { - if(ConfigurationHandler.disableAGAutoOutputter) { - TweakerBase.markItemForRecipeRemoval(com.advGenetics.AdvGenetics.autoOutputUpgrade.itemID, -1); + if(ConfigurationHandler.disableAGAutoOutputter) + { + TweakingRegistry.markItemForRecipeRemoval(com.advGenetics.AdvGenetics.autoOutputUpgrade.itemID, -1, TweakingAction.REMOVED, "Crashes the game"); } } } \ No newline at end of file diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java index f6dac01..f50ea52 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/BigReactorsTweaks.java @@ -1,28 +1,41 @@ 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; import tppitweaks.config.ConfigurationHandler; +import tppitweaks.recipetweaks.RecipeAddition; +import tppitweaks.recipetweaks.RecipeRemoval; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class BigReactorsTweaks { - + + @RecipeRemoval(requiredModids="BigReactors") public static void init() { - if (ConfigurationHandler.steelReactorCasings) + if (ConfigurationHandler.steelReactorCasings && !OreDictionary.getOres("ingotSteel").isEmpty()) { - TweakerBase.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockReactorPart).blockID, 0); + TweakingRegistry.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockReactorPart).blockID, 0, TweakingAction.CHANGED, "Recipe requires steel to", "make the mod later game"); } if (ConfigurationHandler.glassFuelRods) { - TweakerBase.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockYelloriumFuelRod).blockID, -1); - } + TweakingRegistry.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockYelloriumFuelRod).blockID, -1, TweakingAction.CHANGED, "Recipe requires hardened glass", "to make the mod later game"); + } + if (ConfigurationHandler.twoReactorGlass) + { + TweakingRegistry.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass).blockID, 0, TweakingAction.CHANGED, "Recipe output doubled", "to offset the expensive glass"); + TweakingRegistry.markItemForRecipeRemoval(((Block) erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass).blockID, 1, TweakingAction.CHANGED, "Recipe output doubled", "to offset the expensive glass"); + } } + @RecipeAddition(requiredModids="BigReactors") public static void addRecipes() { - if (ConfigurationHandler.steelReactorCasings) + if (ConfigurationHandler.steelReactorCasings && !OreDictionary.getOres("ingotSteel").isEmpty()) { ItemStack reactorPartStack = ((erogenousbeef.bigreactors.common.multiblock.block.BlockReactorPart) erogenousbeef.bigreactors.common.BigReactors.blockReactorPart).getReactorCasingItemStack(); reactorPartStack.stackSize = 4; @@ -33,5 +46,31 @@ public static void addRecipes() GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockYelloriumFuelRod, 1), new Object[] { "ICI", "GUG", "ICI", Character.valueOf('I'), erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass, Character.valueOf('C'), "ingotIron", Character.valueOf('U'), "ingotYellorium", Character.valueOf('G'), "ingotGraphite" })); } + if (ConfigurationHandler.twoReactorGlass) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass, 2), + "gCg", + + 'g', "glassHardened", + 'C', new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockReactorPart, 1, 0))); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass, 2), + "gCg", + + 'g', "glassReinforced", + 'C', new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockReactorPart, 1, 0))); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass, 2, 1), + "gCg", + + 'g', "glassHardened", + 'C', new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockTurbinePart, 1, 0))); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockMultiblockGlass, 2, 1), + "gCg", + + 'g', "glassReinforced", + 'C', new ItemStack(erogenousbeef.bigreactors.common.BigReactors.blockTurbinePart, 1, 0))); + } } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java index aacfc67..e45ef44 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/DATweaks.java @@ -4,19 +4,26 @@ import net.minecraft.item.Item; 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 cpw.mods.fml.common.registry.GameRegistry; public class DATweaks { + @RecipeRemoval(requiredModids="DimensionalAnchors") public static void init() { - TweakerBase.markItemForRecipeRemoval(((Block) mods.immibis.chunkloader.DimensionalAnchors.instance.block).blockID, -1); + if (ConfigurationHandler.tweakDA) + TweakingRegistry.markItemForRecipeRemoval(((Block) mods.immibis.chunkloader.DimensionalAnchors.instance.block).blockID, -1); } + @RecipeAddition(requiredModids="DimensionalAnchors") public static void addRecipes() { - GameRegistry.addRecipe(new ItemStack(mods.immibis.chunkloader.DimensionalAnchors.instance.block, 1, 0), "ded", "oIo", "gog", 'd', Item.diamond, 'e', Item.enderPearl, 'o', Block.obsidian, 'I', Block.blockIron, - 'g', Item.ingotGold); + if(ConfigurationHandler.tweakDA) + GameRegistry.addRecipe(new ItemStack(mods.immibis.chunkloader.DimensionalAnchors.instance.block, 1, 0), "ded", "oIo", "gog", 'd', Item.diamond, 'e', Item.enderPearl, 'o', Block.obsidian, 'I', Block.blockIron,'g', Item.ingotGold); } public static void addTooltip(ItemTooltipEvent event) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java index 4bd76cd..9ee4900 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/DCTweaks.java @@ -2,13 +2,17 @@ import net.minecraft.item.Item; import tppitweaks.config.ConfigurationHandler; +import tppitweaks.recipetweaks.RecipeRemoval; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; import bluedart.item.DartItem; public class DCTweaks { + @RecipeRemoval(requiredModids="DartCraft") public static void init() { if (ConfigurationHandler.disableForceShears && DartItem.forceShears != null) - TweakerBase.markItemForRecipeRemoval(((Item) DartItem.forceShears).itemID, 0); + TweakingRegistry.markItemForRecipeRemoval(((Item) DartItem.forceShears).itemID, 0, TweakingAction.REMOVED, "Crashes servers"); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java new file mode 100644 index 0000000..9825487 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderIOTweaks.java @@ -0,0 +1,54 @@ +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 tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; +import cpw.mods.fml.common.registry.GameRegistry; +import crazypants.enderio.Config; +import crazypants.enderio.EnderIO; + +public class EnderIOTweaks +{ + @RecipeRemoval(requiredModids="EnderIO") + public static void init() + { + if (ConfigurationHandler.makeEIOHardModeEasier && Config.useHardRecipes) + { + TweakingRegistry.markItemForRecipeRemoval(EnderIO.blockReservoir.blockID, -1, TweakingAction.CHANGED, "Easy 'hardmode' recipe"); + TweakingRegistry.markItemForRecipeRemoval(EnderIO.itemBasicCapacitor.itemID, 0, TweakingAction.CHANGED, "Easy 'hardmode' recipe"); + } + + } + + @RecipeAddition(requiredModids="EnderIO") + public static void addRecipes() + { + if (ConfigurationHandler.makeEIOHardModeEasier && Config.useHardRecipes) + { + GameRegistry.addRecipe(new ItemStack(EnderIO.blockReservoir), + "GGG", + "QcQ", + "GGG", + + 'G', new ItemStack(EnderIO.blockFusedQuartz, 1, 1), + 'Q', new ItemStack(EnderIO.blockFusedQuartz), + 'c', Item.cauldron + ); + + GameRegistry.addRecipe(new ShapedOreRecipe(EnderIO.itemBasicCapacitor, + " CR", + "CGC", + "RC ", + + 'C', "ingotCopper", + 'R', "dustRedstone", + 'G', "ingotGold" + )); + } + } +} diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java index 3394f41..ca7d21e 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/EnderStorageTweaks.java @@ -4,17 +4,22 @@ 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 cpw.mods.fml.common.registry.GameRegistry; -public class EnderStorageTweaks extends TweakerBase +public class EnderStorageTweaks extends TweakingRegistry { + @RecipeRemoval(requiredModids={"EnderStorage", "ThermalExpansion"}) public static void init() { - TweakerBase.markItemForRecipeRemoval(((Block) codechicken.enderstorage.EnderStorage.blockEnderChest).blockID, -1); + 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) - TweakerBase.markItemForRecipeRemoval(((Item) codechicken.enderstorage.EnderStorage.itemEnderPouch).itemID, -1); + 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"}) public static void addRecipes() { Object chestEnderElement = ConfigurationHandler.enderChestTesseract ? thermalexpansion.block.TEBlocks.blockTesseract : Item.enderPearl; diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java index 88135fe..f924af0 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ExUTweaks.java @@ -6,58 +6,40 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import tppitweaks.TPPITweaks; 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 cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; +import extrautils.ExtraUtils; public class ExUTweaks { + @RecipeRemoval(requiredModids="ExtraUtilities") public static void init() { if(ConfigurationHandler.nerfEnderQuarry) { - TweakerBase.markItemForRecipeRemoval(extrautils.ExtraUtils.enderQuarry.blockID, -1); - TweakerBase.markItemForRecipeRemoval(extrautils.ExtraUtils.decorative1Id, 11); + TweakingRegistry.markItemForRecipeRemoval(extrautils.ExtraUtils.enderQuarry.blockID, -1, TweakingAction.CHANGED, "Recipe changed to better", "balance with BC quarry recipe"); + TweakingRegistry.markItemForRecipeRemoval(extrautils.ExtraUtils.decorative1Id, 11, TweakingAction.CHANGED, "Recipe changed for ender quarry"); } if(ConfigurationHandler.nerfRedstoneGen) { - TweakerBase.markItemForRecipeRemoval(extrautils.ExtraUtils.generatorId, 4); + TweakingRegistry.markItemForRecipeRemoval(extrautils.ExtraUtils.generatorId, 4, TweakingAction.CHANGED, "Recipe requires 2xcompressed redstone", "because it produces tonnes of RF"); } if(ConfigurationHandler.nerfEnderGen && !OreDictionary.getOres("blockEnderium").isEmpty()) { - TweakerBase.markItemForRecipeRemoval(extrautils.ExtraUtils.generatorId, 3); + TweakingRegistry.markItemForRecipeRemoval(extrautils.ExtraUtils.generatorId, 3, TweakingAction.CHANGED, "Recipe requires enderium", "because it produces tonnes of RF"); } } @SuppressWarnings("unchecked") - public static void fixRecipes() - { - try - { - TPPITweaks.logger.info("You made me do this, RwTema, know that ;_;"); - TPPITweaks.logger.info("Fixing ExtraUtils OreDict registrations by hacky reflection"); - Field f = OreDictionary.class.getDeclaredField("oreIDs"); - f.setAccessible(true); - HashMap temp = (HashMap) f.get(null); - temp.remove("blockUnstable"); - temp.remove("burntquartz"); - temp.remove("icestone"); - f.set(null, temp); - } - catch (Throwable t) - { - t.printStackTrace(); - } - - OreDictionary.registerOre("blockUnstable", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 5)); - OreDictionary.registerOre("burntquartz", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 2)); - OreDictionary.registerOre("icestone", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 3)); - - if (Loader.isModLoaded("gregtech_addon")) - TPPITweaks.logger.info("Stahp, greg, I know. Blame Tema."); - } - + @RecipeAddition(requiredModids="ExtraUtilities") public static void addRecipes() { if(ConfigurationHandler.nerfEnderQuarry) { @@ -147,11 +129,56 @@ public static void addRecipes() { 'F', Block.furnaceIdle )); } + + try + { + Field f = OreDictionary.class.getDeclaredField("oreIDs"); + f.setAccessible(true); + HashMap temp = (HashMap) f.get(null); + temp.remove("nuggetUnstable"); + f.set(null, temp); + } + catch (Throwable t) + { + t.printStackTrace(); + } + + if (ConfigurationHandler.fixExURecipes) + { + try + { + TPPITweaks.logger.info("You made me do this, RwTema, know that ;_;"); + TPPITweaks.logger.info("Fixing ExtraUtils OreDict registrations by hacky reflection"); + Field f = OreDictionary.class.getDeclaredField("oreIDs"); + f.setAccessible(true); + HashMap temp1 = (HashMap) f.get(null); + temp1.remove("blockUnstable"); + temp1.remove("burntquartz"); + temp1.remove("icestone"); + f.set(null, temp1); + } + catch (Throwable t) + { + t.printStackTrace(); + } + + OreDictionary.registerOre("blockUnstable", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 5)); + OreDictionary.registerOre("burntquartz", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 2)); + OreDictionary.registerOre("icestone", new ItemStack(extrautils.ExtraUtils.decorative1, 1, 3)); + } + if (Loader.isModLoaded("gregtech_addon")) + TPPITweaks.logger.info("Stahp, greg, I know. Blame Tema."); } - public static void reAddRecipeAfterLoad() + @RecipeAddition(requiredModids="ExtraUtilities", time=EventTime.PLAYER_JOIN) + public static void doPostLoadRecipeAdditions() { + ItemStack stableIngot = new ItemStack(ExtraUtils.unstableIngot); + stableIngot.stackTagCompound = new NBTTagCompound(); + stableIngot.stackTagCompound.setBoolean("stable", true); + GameRegistry.addRecipe(new ItemStack(extrautils.ExtraUtils.decorative1, 1, 5), "iii", "iii", "iii", 'i', extrautils.ExtraUtils.unstableIngot); + GameRegistry.addRecipe(stableIngot, "nnn", "nnn", "nnn", 'n', new ItemStack(ExtraUtils.unstableIngot, 1, 1)); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java index dfd8d86..c3be29e 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/GregtechTweaks.java @@ -8,14 +8,19 @@ 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 cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; public class GregtechTweaks { + @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 }); @@ -70,8 +75,10 @@ public static void doStuff() } } - public static void addRecipes() { + @RecipeAddition(time=EventTime.PLAYER_JOIN, 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}); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java index 94515da..efc0783 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/IC2Tweaks.java @@ -7,26 +7,35 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; 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 cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; public class IC2Tweaks { + @RecipeRemoval(requiredModids="IC2") public static void init() { if (ConfigurationHandler.removeStupidEnergyCrystalRecipe) - TweakerBase.markItemForRecipeRemoval(((ItemStack)ic2.core.Ic2Items.energyCrystal).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)ic2.core.Ic2Items.energyCrystal).itemID, -1, TweakingAction.REMOVED, "Recipe from dartcraft because", "it is imbalanced with vanilla IC2"); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.iridiumDrill).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.mvTransformer).itemID, 4); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.weedEx).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.suBattery).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.personalSafe).itemID, 0); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.nanoHelmet).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((ItemStack)Ic2Items.electricJetpack).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.iridiumDrill).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.mvTransformer).itemID, 4); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.weedEx).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.suBattery).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.personalSafe).itemID, 0); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.nanoHelmet).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.electricJetpack).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((ItemStack)Ic2Items.carbonFiber).itemID, -1); } + @RecipeAddition(requiredModids="IC2", time=EventTime.INIT) public static void registerOres() { if (ConfigurationHandler.ic2TEGlassInterchangeability) @@ -46,6 +55,7 @@ public static void registerOres() } } + @RecipeAddition(requiredModids="IC2", time=EventTime.INIT) public static void addRecipes() { if(ConfigurationHandler.doCharcoalBlockCompression) { if(!OreDictionary.getOres("blockCharcoal").isEmpty()) { @@ -54,6 +64,7 @@ public static void addRecipes() { } } + @RecipeAddition(requiredModids="IC2", time=EventTime.PLAYER_JOIN) public static void doPostLoadRecipeAdditions() { /* copypasta code, ignore horrible formatting */ @@ -68,5 +79,6 @@ public static void doPostLoadRecipeAdditions() GameRegistry.addRecipe(new ShapedOreRecipe(Ic2Items.personalSafe, new Object[] { "c", "M", "C", Character.valueOf('c'), Ic2Items.recipeObjectCircuit, Character.valueOf('C'), Block.chest, Character.valueOf('M'), Ic2Items.machine })); GameRegistry.addRecipe(new ShapedOreRecipe(Ic2Items.nanoHelmet, new Object[] { "CcC", "CGC", Character.valueOf('C'), Ic2Items.carbonPlate, Character.valueOf('c'), StackUtil.copyWithWildCard(Ic2Items.energyCrystal), Character.valueOf('G'), StackUtil.copyWithWildCard(Ic2Items.nightvisionGoggles) })); GameRegistry.addRecipe(new ShapedOreRecipe(Ic2Items.electricJetpack, new Object[] { "ICI", "IBI", "G G", Character.valueOf('I'), Ic2Items.casingiron, Character.valueOf('C'), Ic2Items.recipeObjectAdvCircuit, Character.valueOf('B'), Ic2Items.batBox, Character.valueOf('G'), Item.glowstone })); + GameRegistry.addRecipe(new ShapelessOreRecipe(Ic2Items.carbonFiber, "dustCoal", "dustCoal", "dustCoal", "dustCoal")); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java new file mode 100644 index 0000000..5ab075e --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/JABBATweaks.java @@ -0,0 +1,41 @@ +package tppitweaks.recipetweaks.modTweaks; + +import mcp.mobius.betterbarrels.BetterBarrels; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +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 cpw.mods.fml.common.registry.GameRegistry; +import factorization.shared.Core; + +public class JABBATweaks +{ + @RecipeRemoval(requiredModids={"JABBA", "factorization", "MineFactoryReloaded"}) + public static void init() + { + if (ConfigurationHandler.tweakJABBA) + TweakingRegistry.markItemForRecipeRemoval(BetterBarrels.barrelID, -1, TweakingAction.CHANGED, "Recipe changed to reflect", "the title of 'better barrel'"); + } + + @RecipeAddition(requiredModids={"JABBA", "factorization", "MineFactoryReloaded"}) + public static void addRecipes() + { + if (ConfigurationHandler.tweakJABBA) + { + GameRegistry.addRecipe(new ShapedOreRecipe(BetterBarrels.blockBarrel, + "wBw", + "wUw", + "www", + + 'w', "plankWood", + 'B', new ItemStack(Core.registry.daybarrel, 1, OreDictionary.WILDCARD_VALUE), + 'U', Machine.Unifier.getItemStack() + )); + } + } +} diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java new file mode 100644 index 0000000..0be2489 --- /dev/null +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MFRTweaks.java @@ -0,0 +1,49 @@ +package tppitweaks.recipetweaks.modTweaks; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.ShapedOreRecipe; +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 cpw.mods.fml.common.registry.GameRegistry; + +public class MFRTweaks +{ + @RecipeRemoval(requiredModids="MineFactoryReloaded") + public static void init() + { + if (ConfigurationHandler.buffUnifierRecipe) + TweakingRegistry.markItemForRecipeRemoval(Machine.Unifier.getBlockId(), 8, TweakingAction.CHANGED, "Cheapened for use", "in JABBA barrels"); + } + + @RecipeAddition(requiredModids="MineFactoryReloaded") + public static void addRecipes() + { + if (ConfigurationHandler.buffUnifierRecipe) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.machineBaseItem, 3), + "RRR", + "SSS", + + 'R', "sheetPlastic", + 'S', "stone" + )); + + GameRegistry.addRecipe(new ShapedOreRecipe(Machine.Unifier.getItemStack(), + "RRR", + "rCr", + " M ", + + 'R', "sheetPlastic", + 'r', Item.redstone, + 'C', Item.comparator, + 'M', MineFactoryReloadedCore.machineBaseItem + )); + } + } +} diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java index 3811731..ee79416 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MPSATweaks.java @@ -2,90 +2,74 @@ 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; public class MPSATweaks { private static ItemStack solarPanel, magnet, computerChip; + @RecipeRemoval(requiredModids="powersuitaddons") public static void init() { solarPanel = andrew.powersuits.common.AddonComponent.solarPanel; magnet = andrew.powersuits.common.AddonComponent.magnet; computerChip = andrew.powersuits.common.AddonComponent.computerChip; - - //removeRecipes(); - - TweakerBase.markItemForRecipeRemoval(solarPanel.itemID, 17); - TweakerBase.markItemForRecipeRemoval(magnet.itemID, 18); - TweakerBase.markItemForRecipeRemoval(computerChip.itemID, 19); - } - - /*@SuppressWarnings("unchecked") - private static void removeRecipes() - { - Iterator iter = CraftingManager.getInstance().getRecipeList().listIterator(); - - while (iter.hasNext()) + + if (ConfigurationHandler.changeMPSARecipes) { - IRecipe recipe = iter.next(); - if (recipe.getRecipeOutput() != null && recipe.getRecipeOutput().itemID == solarPanel.itemID && matchesDamage(recipe)) - { - iter.remove(); - } + TweakingRegistry.markItemForRecipeRemoval(solarPanel.itemID, 17); + TweakingRegistry.markItemForRecipeRemoval(magnet.itemID, 18); + TweakingRegistry.markItemForRecipeRemoval(computerChip.itemID, 19); } } - private static boolean matchesDamage(IRecipe recipe) + @RecipeAddition(requiredModids="powersuitaddons") + public static void addRecipes() { - int[] damages = {17,18,19}; - for (int i : damages) + if (ConfigurationHandler.changeMPSARecipes) { - if (i == recipe.getRecipeOutput().getItemDamage()) - return true; + ItemStack powerCoilGold = thermalexpansion.item.TEItems.powerCoilGold; + ItemStack powerCoilSilver = thermalexpansion.item.TEItems.powerCoilSilver; + ItemStack powerCoilElectrum = thermalexpansion.item.TEItems.powerCoilElectrum; + + GameRegistry.addRecipe(new ShapedOreRecipe(solarPanel, new Object[]{ + "GGG", + "PPP", + "WWW", + + 'G', "glassHardened", + 'P', "ingotPlatinum", + 'W', "componentWiring" + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(magnet, new Object[]{ + "IRI", + "SSS", + "sRs", + + 'I', "ingotInvar", + 'R', powerCoilGold, + 'S', "componentSolenoid", + 's', "ingotSteel" + + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(computerChip, new Object[]{ + "SC ", + "RIT", + "WWW", + + 'S', "componentSolenoid", + 'C', powerCoilElectrum, + 'R', powerCoilGold, + 'I', new ItemStack(buildcraft.BuildCraftSilicon.redstoneChipset, 1, 1), + 'T', powerCoilSilver, + 'W', "componentWiring" + })); } - return false; - }*/ - - public static void addRecipes() - { - ItemStack powerCoilGold = thermalexpansion.item.TEItems.powerCoilGold; - ItemStack powerCoilSilver = thermalexpansion.item.TEItems.powerCoilSilver; - ItemStack powerCoilElectrum = thermalexpansion.item.TEItems.powerCoilElectrum; - - GameRegistry.addRecipe(new ShapedOreRecipe(solarPanel, new Object[]{ - "GGG", - "PPP", - "WWW", - - 'G', "glassHardened", - 'P', "ingotPlatinum", - 'W', "componentWiring" - })); - - GameRegistry.addRecipe(new ShapedOreRecipe(magnet, new Object[]{ - "IRI", - "SSS", - "sRs", - - 'I', "ingotInvar", - 'R', powerCoilGold, - 'S', "componentSolenoid", - 's', "ingotSteel" - - })); - - GameRegistry.addRecipe(new ShapedOreRecipe(computerChip, new Object[]{ - "SC ", - "RIT", - "WWW", - - 'S', "componentSolenoid", - 'C', powerCoilElectrum, - 'R', powerCoilGold, - 'I', new ItemStack(buildcraft.BuildCraftSilicon.redstoneChipset, 1, 1), - 'T', powerCoilSilver, - 'W', "componentWiring" - })); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java index 9a3e4cf..58604e0 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndIC2Tweaks.java @@ -1,11 +1,17 @@ package tppitweaks.recipetweaks.modTweaks; import net.minecraft.item.ItemStack; +import tppitweaks.recipetweaks.RecipeAddition; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; public class MagicropsAndIC2Tweaks { + @RecipeAddition(requiredModids={"magicalcrops", "IC2"}) public static void addRecipes() { + ItemStack macerator = ic2.core.Ic2Items.macerator; + TweakingRegistry.addTweakedTooltip(macerator.itemID, macerator.getItemDamage(), TweakingAction.ADDED, "Recipe for Essence Ore and", "Nether Essence Ore"); ic2.core.block.machine.tileentity.TileEntityMacerator.addRecipe("oreMCropsEssence", 1, new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 8, 0)); ic2.core.block.machine.tileentity.TileEntityMacerator.addRecipe("oreMCropsNetherEssence", 1, new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 12, 0)); } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java index 757df33..f0707f3 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsAndTETweaks.java @@ -2,11 +2,17 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import tppitweaks.recipetweaks.RecipeAddition; +import tppitweaks.recipetweaks.TweakingRegistry; +import tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; public class MagicropsAndTETweaks { + @RecipeAddition(requiredModids={"magicalcrops", "ThermalExpansion"}) public static void addRecipes() { + ItemStack pulv = thermalexpansion.block.machine.BlockMachine.pulverizer; + TweakingRegistry.addTweakedTooltip(pulv.itemID, pulv.getItemDamage(), TweakingAction.ADDED, "Recipes for Essence Ore and", "Nether Essence Ore"); thermalexpansion.util.crafting.PulverizerManager.addRecipe(2400, OreDictionary.getOres("oreMCropsEssence").get(0), new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 8, 0), new ItemStack(magicalcrops.mod_mCrops.CropEssence, 1, 0), 5); thermalexpansion.util.crafting.PulverizerManager.addRecipe(2400, OreDictionary.getOres("oreMCropsNetherEssence").get(0), new ItemStack(magicalcrops.mod_mCrops.MagicEssence, 12, 0), new ItemStack(magicalcrops.mod_mCrops.CropEssence, 1, 0), 10); } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java index 915bb23..1cc7d75 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MagicropsTweaks.java @@ -5,23 +5,29 @@ 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 cpw.mods.fml.common.registry.GameRegistry; public class MagicropsTweaks { + @RecipeRemoval(requiredModids="magicalcrops") public static void init() { - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsEssence.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsDiamond.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsEmerald.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsXP.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsThaumcraftShard.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsCobalt.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsArdite.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsPlatinum.itemID, -1); - TweakerBase.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsUranium.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsEssence.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsDiamond.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsEmerald.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsXP.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsThaumcraftShard.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsCobalt.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsArdite.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsPlatinum.itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(magicalcrops.mod_mCrops.mSeedsUranium.itemID, -1); } + @RecipeAddition(requiredModids="magicalcrops", time=EventTime.INIT) public static void registerOres() { if (ConfigurationHandler.registerMagicalCropsOre) @@ -31,6 +37,7 @@ public static void registerOres() } } + @RecipeAddition(requiredModids="magicalcrops") public static void addRecipes() { if (ConfigurationHandler.addEssenceSeedRecipe) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java index 9f44ee4..aaf80dc 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java @@ -8,27 +8,40 @@ 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 cpw.mods.fml.common.registry.GameRegistry; public class MekanismTweaks { + @RecipeRemoval(requiredModids="Mekanism") public static void init() { if (ConfigurationHandler.harderDisassemblerRecipe) { - TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicDisassembler).itemID, -1); - TweakerBase.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicCore).itemID, -1); + TweakingRegistry.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicDisassembler).itemID, -1, TweakingAction.CHANGED, "Changed to ensure", "balance with all other tools"); + TweakingRegistry.markItemForRecipeRemoval(((Item) mekanism.common.Mekanism.AtomicCore).itemID, -1, TweakingAction.CHANGED, "Changed to further", "balance all of Mekanism"); } if (ConfigurationHandler.disableCardboardBox) { - TweakerBase.markItemForRecipeRemoval(mekanism.common.Mekanism.cardboardBoxID, -1); + TweakingRegistry.markItemForRecipeRemoval(mekanism.common.Mekanism.cardboardBoxID, -1); } + if (ConfigurationHandler.disableUniversalCables) + { + for(int i = 0; i < 4; i++) { + TweakingRegistry.markItemForRecipeRemoval(mekanism.common.Mekanism.PartTransmitter.itemID, i, TweakingAction.REMOVED, "Crashes"); + } + } + if (ConfigurationHandler.disableMiner || ConfigurationHandler.nerfMiner) { - TweakerBase.markItemForRecipeRemoval(mekanism.common.Mekanism.machineBlockID, 4); + TweakingRegistry.markItemForRecipeRemoval(mekanism.common.Mekanism.machineBlockID, 4, TweakingAction.CHANGED, "Changed to balance better", "with other quarry-like blocks"); } } + @RecipeAddition(requiredModids="Mekanism") public static void addRecipes() { if (ConfigurationHandler.harderDisassemblerRecipe) diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java index a4e4993..3d0880e 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/OpenBlocksTweaks.java @@ -4,21 +4,40 @@ 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 tppitweaks.recipetweaks.TweakingRegistry.TweakingAction; import cpw.mods.fml.common.registry.GameRegistry; public class OpenBlocksTweaks { + @RecipeRemoval(requiredModids="OpenBlocks") public static void init() { - TweakerBase.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockBreaker).blockID, -1); - TweakerBase.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockPlacer).blockID, -1); + if (ConfigurationHandler.eloraamBreakersAndDeployers) + { + if (openblocks.OpenBlocks.Blocks.blockBreaker != null) + TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockBreaker).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes"); + + if (openblocks.OpenBlocks.Blocks.blockPlacer != null) + TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockPlacer).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes"); + } } + @RecipeAddition(requiredModids="OpenBlocks") public static void addRecipes() { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockBreaker), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Item.pickaxeIron, 'P', - Block.pistonBase, 'R', Item.redstone })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockPlacer), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Block.chest, 'P', - Block.pistonBase, 'R', Item.redstone })); + if (ConfigurationHandler.eloraamBreakersAndDeployers) + { + if (openblocks.OpenBlocks.Blocks.blockBreaker != null) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockBreaker), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Item.pickaxeIron, + 'P', Block.pistonBase, 'R', Item.redstone })); + + if (openblocks.OpenBlocks.Blocks.blockPlacer != null) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockPlacer), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Block.chest, 'P', + Block.pistonBase, 'R', Item.redstone })); + } } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java index a484aae..4362c1c 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/RailcraftTweaks.java @@ -4,10 +4,15 @@ 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 cpw.mods.fml.common.registry.GameRegistry; public class RailcraftTweaks { + @RecipeAddition(requiredModids={"Railcraft"}, time=EventTime.PLAYER_JOIN) public static void registerOres() { // Please don't kill me CJ @@ -19,5 +24,9 @@ public static void registerOres() GameRegistry.addRecipe(new ShapelessOreRecipe(plateIron, "plateIron")); GameRegistry.addRecipe(new ShapelessOreRecipe(plateSteel, "plateSteel")); GameRegistry.addRecipe(new ShapelessOreRecipe(plateTin, "plateTin")); + + TweakingRegistry.addTweakedTooltip(plateIron.itemID, plateIron.getItemDamage(), TweakingAction.ADDED, "Shapeless recipe to swap", "plate types"); + TweakingRegistry.addTweakedTooltip(plateIron.itemID, plateSteel.getItemDamage(), TweakingAction.ADDED, "Shapeless recipe to swap", "plate types"); + TweakingRegistry.addTweakedTooltip(plateIron.itemID, plateTin.getItemDamage(), TweakingAction.ADDED, "Shapeless recipe to swap", "plate types"); } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java index 7d2726f..33d5f65 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/ReliquaryTweaks.java @@ -3,25 +3,35 @@ 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; public class ReliquaryTweaks { + @RecipeRemoval(requiredModids="xreliquary") public static void init() { - TweakerBase.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() { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(xreliquary.items.XRItems.condensedPotion, 1, 10), new Object[]{ - "sap", - "aap", - "ppp", - - 's', xreliquary.items.XRItems.condensedPotion, - 'a', Item.appleGold, - 'p', new ItemStack(Item.dyePowder, 1, 15) - })); + if (ConfigurationHandler.harderLillipadRecipe) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(xreliquary.items.XRItems.condensedPotion, 1, 10), + "sap", + "aap", + "ppp", + + 's', xreliquary.items.XRItems.condensedPotion, + 'a', Item.appleGold, + 'p', new ItemStack(Item.dyePowder, 1, 15) + )); + } } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java index c4167fc..ff1cd74 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/SFMTweaks.java @@ -4,73 +4,84 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; 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 cpw.mods.fml.common.registry.GameRegistry; public class SFMTweaks { + @RecipeRemoval(requiredModids={"AppliedEnergistics", "StevesFactoryManager"}) public static void init() { - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockManager).blockID, -1); - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCable).blockID, -1); - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableRelay).blockID, 8); - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableInput).blockID, -1); - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableOutput).blockID, -1); - - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableIntake).blockID, -1); - TweakerBase.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableBreaker).blockID, -1); + if (ConfigurationHandler.tweakSFM) + { + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockManager).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCable).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableRelay).blockID, 8, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableInput).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableOutput).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableIntake).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + TweakingRegistry.markItemForRecipeRemoval(((Block) vswe.stevesfactory.blocks.Blocks.blockCableBreaker).blockID, -1, TweakingAction.CHANGED, "Recipe changed to be AE-like", "to balance the vast capabilities", "of this normally cheap mod"); + } } - + + @RecipeAddition(requiredModids={"AppliedEnergistics", "StevesFactoryManager"}) public static void addRecipes() { - GameRegistry.addRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockManager), new Object[] { "III", "IRI", "SPS", Character.valueOf('R'), new ItemStack(ModItems.tppiMaterial), + if (ConfigurationHandler.tweakSFM) + { + GameRegistry.addRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockManager), new Object[] { "III", "IRI", "SPS", Character.valueOf('R'), new ItemStack(ModItems.tppiMaterial), Character.valueOf('P'), appeng.api.Materials.matConversionMatrix.copy(), Character.valueOf('I'), Item.ingotIron, Character.valueOf('S'), Block.stone }); - GameRegistry.addRecipe( - new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCable, 8), - new Object[] { "GPG", "IRI", "GPG", Character.valueOf('R'), appeng.api.Materials.matFluxDust.copy(), Character.valueOf('G'), Block.glass, Character.valueOf('I'), Item.ingotIron, + GameRegistry.addRecipe( + new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCable, 8), + new Object[] { "GPG", "IRI", "GPG", Character.valueOf('R'), appeng.api.Materials.matFluxDust.copy(), Character.valueOf('G'), Block.glass, Character.valueOf('I'), Item.ingotIron, Character.valueOf('P'), Block.pressurePlateIron }); - GameRegistry.addRecipe( - new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableRelay, 1, 8), - new Object[]{ - "fBf", - "BIB", - "fBf", - - 'B', Block.blockLapis, - 'I', vswe.stevesfactory.blocks.Blocks.blockCableRelay, - 'f', appeng.api.Materials.matFluxDust.copy() - }); - - GameRegistry.addRecipe( - new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableInput), - new Object[]{ - " r ", - "rIr", - " r ", - - 'r', Item.redstone, - 'I', vswe.stevesfactory.blocks.Blocks.blockCable - }); - - GameRegistry.addRecipe( - new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableOutput), - new Object[]{ - "rtr", - "rIr", - "rrr", - - 'r', Item.redstone, - 't', appeng.api.Blocks.blkLevelEmitter.copy(), - 'I', vswe.stevesfactory.blocks.Blocks.blockCable - }); - - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 0), vswe.stevesfactory.blocks.Blocks.blockCable, Block.hopperBlock, Block.dropper, appeng.api.Blocks.blkInterface.copy())); - - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 8), new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 0), appeng.api.Materials.matProcessorBasic.copy())); - - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableBreaker), vswe.stevesfactory.blocks.Blocks.blockCable, Item.pickaxeIron, Block.dispenser, appeng.api.Blocks.blkInterface.copy())); - + GameRegistry.addRecipe( + new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableRelay, 1, 8), + new Object[]{ + "fBf", + "BIB", + "fBf", + + 'B', Block.blockLapis, + 'I', vswe.stevesfactory.blocks.Blocks.blockCableRelay, + 'f', appeng.api.Materials.matFluxDust.copy() + }); + + GameRegistry.addRecipe( + new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableInput), + new Object[]{ + " r ", + "rIr", + " r ", + + 'r', Item.redstone, + 'I', vswe.stevesfactory.blocks.Blocks.blockCable + }); + + GameRegistry.addRecipe( + new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableOutput), + new Object[]{ + "rtr", + "rIr", + "rrr", + + 'r', Item.redstone, + 't', appeng.api.Blocks.blkLevelEmitter.copy(), + 'I', vswe.stevesfactory.blocks.Blocks.blockCable + }); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 0), vswe.stevesfactory.blocks.Blocks.blockCable, Block.hopperBlock, Block.dropper, appeng.api.Blocks.blkInterface.copy())); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 8), new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableIntake, 1, 0), appeng.api.Materials.matProcessorBasic.copy())); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(vswe.stevesfactory.blocks.Blocks.blockCableBreaker), vswe.stevesfactory.blocks.Blocks.blockCable, Item.pickaxeIron, Block.dispenser, appeng.api.Blocks.blkInterface.copy())); + } } } diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java index 6b2c64c..be23751 100644 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java +++ b/src/main/java/tppitweaks/recipetweaks/modTweaks/TETweaks.java @@ -5,31 +5,46 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; +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 cpw.mods.fml.common.registry.GameRegistry; public class TETweaks { + @RecipeRemoval(requiredModids="ThermalExpansion") public static void init() { - TweakerBase.markItemForRecipeRemoval(thermalexpansion.block.TEBlocks.blockDevice.blockID, 2); + if (ConfigurationHandler.harderActivatorRecipe) + TweakingRegistry.markItemForRecipeRemoval(thermalexpansion.block.TEBlocks.blockDevice.blockID, 2, TweakingAction.CHANGED, "Recipe requires steel", "to make this a later game item"); } + @RecipeAddition(requiredModids="ThermalExpansion") public static void addRecipes() { try { GameRegistry.addShapelessRecipe(new ItemStack(Item.paper, 3), new Object[] {thermalexpansion.item.TEItems.woodchips, thermalexpansion.item.TEItems.woodchips, thermalexpansion.item.TEItems.woodchips}); - }catch(Throwable t) {} + }catch(Throwable t){ + TPPITweaks.logger.severe("Could not add paper recipe to pulverizer!"); + t.printStackTrace(); + } - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(thermalexpansion.block.TEBlocks.blockDevice.blockID, 1, 2), new Object[]{ - "scs", - "tpt", - "sns", - - 's', "ingotSteel", - 'p', Block.pistonBase, - 't', "ingotTin", - 'c', Block.chest, - 'n', thermalexpansion.item.TEItems.pneumaticServo - })); + if (ConfigurationHandler.harderActivatorRecipe) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(thermalexpansion.block.TEBlocks.blockDevice.blockID, 1, 2), new Object[]{ + "scs", + "tpt", + "sns", + + 's', OreDictionary.getOres("ingotSteel").isEmpty() ? "ingotIron" : "ingotSteel", + 'p', Block.pistonBase, + 't', "ingotTin", + 'c', Block.chest, + 'n', thermalexpansion.item.TEItems.pneumaticServo + })); + } if (OreDictionary.getOres("dustRuby").size() != 0) thermalexpansion.util.crafting.PulverizerManager.addIngotNameToDustRecipe(2400, "gemRuby", OreDictionary.getOres("dustRuby").get(0)); diff --git a/src/main/java/tppitweaks/recipetweaks/modTweaks/TweakerBase.java b/src/main/java/tppitweaks/recipetweaks/modTweaks/TweakerBase.java deleted file mode 100644 index b870b51..0000000 --- a/src/main/java/tppitweaks/recipetweaks/modTweaks/TweakerBase.java +++ /dev/null @@ -1,21 +0,0 @@ -package tppitweaks.recipetweaks.modTweaks; - -import java.util.HashMap; -import java.util.HashSet; - -public class TweakerBase -{ - private static HashMap> recipesToRemove = new HashMap>(); - - public static void markItemForRecipeRemoval(int id, int meta) { - if(!recipesToRemove.containsKey(id)) { - recipesToRemove.put(id, new HashSet()); - } - recipesToRemove.get(id).add(meta); - } - - public static HashSet getDamageValuesToRemove(int itemID) { - return recipesToRemove.get(itemID); - } - -} \ No newline at end of file diff --git a/src/main/java/tppitweaks/util/FileLoader.java b/src/main/java/tppitweaks/util/FileLoader.java index b780b78..cafdff0 100644 --- a/src/main/java/tppitweaks/util/FileLoader.java +++ b/src/main/java/tppitweaks/util/FileLoader.java @@ -177,41 +177,58 @@ public static String manuallyGetConfigValue(Map m, String string return ""; } - public static InputStream getGuideText() + public static InputStream getGuideText() { - bookText = TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/BookText.txt"); + bookText = loadFile(new File(ConfigurationHandler.cfg.getParent() + "/BookText.txt")); return bookText; } - public static InputStream getChangelogText() throws FileNotFoundException + public static InputStream getChangelogText() { - File changelog = new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt"); - - if (!changelog.exists()) + 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 { - changelog.createNewFile(); - fw = new FileWriter(changelog); - fw.write("Default Changelog, please make sure the correct changelog exists in the TPPI directory before launching next time!"); + 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 changelog!"); + TPPITweaks.logger.severe("Could not create default file" + file.getName() + "!"); e1.printStackTrace(); } } - changelogText = new FileInputStream(new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt")); - - return changelogText; + try + { + return new FileInputStream(file); + } + catch (FileNotFoundException e) + { + IOErr(file.getName(), e); + return null; + } } - - public static InputStream getSupportedModsFile() + + private static void IOErr(String filename, IOException e) { - supportedMods = TPPITweaks.class.getResourceAsStream("/assets/tppitweaks/lang/" + ConfigurationHandler.supportedModsName + ".txt"); - return supportedMods; + 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); } /* diff --git a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java b/src/main/java/tppitweaks/util/TPPIPlayerTracker.java index 6eaa455..f765625 100644 --- a/src/main/java/tppitweaks/util/TPPIPlayerTracker.java +++ b/src/main/java/tppitweaks/util/TPPIPlayerTracker.java @@ -5,6 +5,7 @@ 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.FMLCommonHandler; @@ -42,7 +43,7 @@ public void onPlayerRespawn(EntityPlayer player) private boolean addBook(EntityPlayer player) { - if (player != null && !player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook") && FMLCommonHandler.instance().getEffectiveSide().isServer()) + if (player != null && ConfigurationHandler.doSpawnBook && !player.getEntityData().getCompoundTag("TPPI").getBoolean("hasBook") && FMLCommonHandler.instance().getEffectiveSide().isServer()) { TPPITweaks.logger.log(Level.INFO, "Adding book"); diff --git a/src/main/resources/assets/tppitweaks/lang/BookText.txt b/src/main/resources/assets/tppitweaks/lang/BookText.txt deleted file mode 100644 index 7114135..0000000 --- a/src/main/resources/assets/tppitweaks/lang/BookText.txt +++ /dev/null @@ -1,80 +0,0 @@ -**This is the file that TPPI Tweaks reads its info from, it is used for changelogs and information on the modpack** -**To add to the file, type what you want, and separate pages by using the phrase ~~~ ** -**The code will interpret "~~~" as a page break, and format the book accordingly** -**In addition, adding a "~" to the end of a line will add a line break** -**Two asterisks at the beginning of a line is a comment** -**Three asterisks and a number will skip that amount of lines following** - -***12 -Example: -This is some very useful info -And I am typing it on multiple lines -to make this text file easier to read. -These lines don't have line breaks between them -in the book though because they don't end with "~". -~~~ -Now I am on page 2~ -Now I am one line down~ -~ -Now I am after a blank line - -**Begin book text after asterisks** -**************************************************************************** -Greetings everyone, and welcome to Test Pack Please Ignore!~ -~ -~ -We're really excited to bring this pack to you all. -~~~ -We also couldn't have done so without the Feed The Beast subreddit community, -who the pack is made by and for.~ -~ -Thank you all so very much for making TPPI possible! -~~~ -This book you're reading is added by our own custom mod, TPPI Tweaks.~ -~ -It will always automatically contain the most up-to-date information -on the pack, so check it often!~ -~ -Should you want a new copy, you can craft one with an iron ingot and three paper, -but this is not necessary to recieve new info!. -~~~ -Another feature of TPPI Tweaks is the in-game commands it adds.~ -~ -The changelog can be found by typing /tppi changelog, which will of course always -be up to date, no need to ever get a new copy.~ -~ -We're also working on a project to add in-game documentation for all -the mods in the pack, to be accessed via commands.~ -~~~ -Type /tppi guide to receive an all-around guide to the documentation system, -the easiest way to obtain info on any mod you wish.~ -~~~ -Type /tppi mods to get an individual book for a mod, or to get -a link if the mod has not had in-game documentation written for it yet.~ -/tppi mods list will give you a list of all mods that are possible to be used in the command. -~~~ -Naturally, this is a big job, and it's not yet finished. -~ -It is our hope that the community will get -involved in documenting these mods via our mod's system.~ -~ -If you'd like to help out with this documentation project or any other parts of TPPI's -development, feel free to type the command /tppi getInvolved to learn more. -~~~ -Lastly, the /tppi ores command will give you a book on TPPI's unique layer-based -ore generation system.~ -~ -Judge has worked very hard on it, and we're very happy that almost everyone sees it as a good change. -~~~ -That's about it. Have fun!~ -~ -~ -~ -~ -~ -~ -~ -~ -~ - Love,~ - -The Dev Team diff --git a/src/main/resources/assets/tppitweaks/lang/SupportedMods.txt b/src/main/resources/assets/tppitweaks/lang/SupportedMods.txt deleted file mode 100644 index 7cda338..0000000 --- a/src/main/resources/assets/tppitweaks/lang/SupportedMods.txt +++ /dev/null @@ -1,1037 +0,0 @@ -**This is the file of supported mods and the info to go along with them** -**To add a mod to the file, type >ModCommandName, ModProperName<** -**The ModCommandName cannot have spaces, and will be used to call the mod's info command.** -**The ModProperName can have spaces - this is the "real name" of the mod, to be used in its guidebook title.** -**Example: >ThermalExpansion, Thermal Expansion 3<** -**After that, type any info about the mod. Mod information is naturally separated by the names of mods (inside ><)** -**To just specify a link, use <> (ex. ) and this will be put into the chat instead of a book** -**You CANNOT have a mod's documentation be both a book and a link, due to current limitations of the mod** -**That means, for mods where you want to link to a wiki, the link should be all that's there under it in this** -**documentation file.** -**The code will interpret "~~~" as a page break, and format the book accordingly** -**In addition, adding a "~" to the end of a line will add a line break** -**Two asterisks at the beginning of a line is a comment** -**Three asterisks and a number will skip that amount of lines following** - - -**Linked means there is a link to the wiki/website, but I (gr8pefish) still want to document it in-game if I have time** -**Incomplete means there is some documentation, but not as much as I would like** -**If you alter this code please update this to-do. Or if you are working on one, put your name next to it. Thanks!** -**TO DO:** -**additional builcraft objects** -**applied energistics [Linked]** -**bibliocraft [Linked]** -**big reactors [Linked]** -**blood magic [Linked]** -**buildcraft [Incomplete]** -**computercraft [Linked]** -**engineers toolbox [Linked]** -**extra cells [Linked]** -**extra bees** -**extra trees** -**factorization [Linked]** -**forestry-machines [Linked]** -**forestry-bees [Linked]** -**forestry-trees [Linked]** -**gregtech? [linked] (Maybe just a basics guide?)** -**hardcore ender expansion [Linked]** -**industrial craft [Burn477?] (posted in r/TPPI)** -**logistics pipes [Linked]** -**magical crops [Linked]** -**mariculture [Linked]** -**mekanism [Linked]** -**MFFS [Linked]** -**MPS [Linked]** -**MPSA [Linked]** -**MystCraft-WritingAges [Linked]** -**MystCraft-General [Linked]** -**Nuclear control [Linked]** -**Open blocks** -**portal gun [Linked]** -**project red [Linked]** -**quarry plus** -**railcraft-rails [Linked]** -**railcraft-other [Linked]** -**redstone arsenal [Incomplete]** -**reliquary {Linked}** -**steve's carts [Linked]** -**steve's factory manager [Linked]** -**thermal expansion (incomplete)** -**twilight forest [Linked]** -**witchery [Incomplete?]** - - -***15 -Example: ->ModName< -This is some very useful info -and I am typing it on multiple lines -to make this text file easier to read. -These lines don't have line breaks between them -in the book though because they don't end with "~". -~~~ -Now I am on page 2~ -Now I am one line down~ -~ -Now I am after a blank line ->ModName2< - - -**Begin line after asterisks** -**************************************************************************** -**>AdditionalBuildcraftObjects, Additional Buildcraft Objects<** - ->AdvancedSolarPanels, Advanced Solar Panels< -Advanced Solar Panels is an addon for Industrial Craft 2 (IC2). It only adds a couple of blocks, and they are mostly -solar panels that deliver high output for a very high initial material cost.~ -~ -The advanced solar panel generates 8 eu/t in daytime, 1 eu/t at night~ -The hybrid solar panel generates 64 eu/t in daytime, 8 eu/t at night~ -The ultimate hybrid solar panel generates 512 eu/t in daytime, 64 eu/t at night~ -~ -The mollecular assembler converts items into better versions of themselves for a high energy cost. For example, 1 Glowstone -becomes 1 Sunnarium (needed for the ultimate hybrid solar panel) with the input of 9,000,000 EU. THis machine can accept -any amount of energy, and any number of packets of energy (i.e. It won't explode). - ->AppliedEnergistics, Applied Energistics< - - ->ArsMagica, Ars Magica 2< -Ars Magica 2 is a magical mod with RPG elements. Think mana, spellcasting, levelling up, and fighting fearsome enemies!~ -~ -It's worth noting that, due to our having had to disable Dryads in TPPI, Nature Guardians must be summoned from their spawn eggs, which we've added a crafting recipe for. -~~~ -Other than that, check out the mod's own in-game guide!~ -~ -To get it, craft an Item Frame and -a normal Book, and get exploring!~ -~ -You'll have to find liquid Essence; a cyan liquid found in pools in forests and similar biomes.~ -~~~ -Once you've found an essence pool, place the Item Frame so that it is directly above -the pool of Essence, and place the Book inside the Item Frame.~ -~ -After some flashes and sparkles, your guidebook will be ready! -~~~ -If you find the book confusing, the first things you should craft to unlock the rest of the mod would be the -oculus, inscription table, and crafting alter, respectively.~ -~ -After doing that, the rest of the mod is yours to explore! - - ->BiblioCraft, BiblioCraft< - -**Will document fully when I have time** - ->BigReactors, Big Reactors< - - ->BiomesOPlenty, Biomes O Plenty< -Biomes O' Plenty (BOP) adds a large number of biomes to the world generation. It is also highly configurable; you can adjust which -biomes appear as well as adjust the landmass perecentage, village rarity and more.~ -~ -BOP also adds another Dimension, called "The Promised Land," which can be found by combining end stone and various ores -found in differnt biomes. The gems and their biome locations are as follows:~ -~ -Emerald: Forest/Mountain type biomes~ -Ruby: Desert type biomes~ -Peridot: Grassland type biomes~ -Topaz: Jungle/Tropical type biomes~ -Tanzanite: Snow type biomes~ -Apatite: Swamp type biomes - - ->BloodMagic, Blood Magic< - - -**Split into silicon, transport, etc? ->Buildcraft, Buildcraft 4< -Buildcraft adds a load of cool ways to automate crafting, processing, and mining.~ -~ -This mod adds "engines" which are ways to produce MJ. You can also use Thermal Expansion's dynamos, -but you must have an energy conduit between the dynamo and the machine.~ -~ -There are many different machines, for instance, the quarry. The quarry is an semi-automatic way to mine. You can use -landmarks to set the size of the quarry, but keep in mind 64x64 is the maximum size. Apply a redstone signal to landmarks -to see a red line extending for 64 blocks. The automatic crafting table crafts stuff, automatically! Totally unexpected! -~ -You can also use pipes to transport items, for instance you can make a automated smelter. If you want to learn better, -just start practicing and you'll get the hang of it, or you can watch a mod spotlight. -~ - ->BuildcraftAddon, Buildcraft Addon< -Buildcraft Addon adds only 3 items.~ -~ -The stair placer places stairs from your inventory into the world, similiar to the Builder's wand from Extra Utilities, -except this only works with stairs.~ -~ -The color selector and color sorter act as an addition to buildcraft transport's item coloring system. It acts as an improved -lazuli transport pipe in that it will color items to be sorted by the dazuli transport pipe. The color selector allows the user -to set multiple ghost items in it's GUI (accessed by right clicking) and then select the color the items will be colored to. -It requires a small amount of power to operate. It is very similar to Red Power 2's sorter.~ -The color selector lets you easily color a pipe as well. Right click it (while not pointing at anything) to open the GUI. - ->CarpentersBlocks, Carpenter's Blocks< -Carpenter's Blocks adds wooden frames of vanilla items that can be textured with other blocks to change the appearance.~ -~ -This mod is mainly used for aesthetic purposes.~ -~ -There are two tools in addition to the blocks added, the "Carpenter's Hammer" and the "Carpenter's Chisel". These are used -to alter the carpenter's blocks. -~~~ -Basics~ -~ -Once a Carpenter's block is placed in the world, right-click it with any full-size block (except TileEntities: chests, -machines, etc.) If the block is compatible, it will take on the appearance of the placed block and also any properties -of it (fire-resistance, explosion-resistance, etc.) To remove the block used for texturing shift left-click with the -carpenter's hammer. To alter the appearance further left/right click with the chisel to cycle through additional -patterns.~ -~ -In general, left-clicking a carpenter's block with the hammer will re-orient it (turn it left/right) while right-clicking -will change the block (ex: stairs -> corner stairs -> upside-down stairs -> etc.) -~~~ -Additionally, once a carpenter's block has an overlayed appearance another block can be placed on any side to create a -cover on the block. These can be altered indepently of the main block.~ -~ -Some items can be used as overlays even though they are not full blocks. These include: seeds, snowballs, vines, string, -wheat and mushrooms.~ -~ -All 16 dyes can be used to color a carpenter's blocks. This affects existing overlays, so placing dirt on a carpenter's -block and then putting purple dye on that will yield purple dirt! Also, the "chisel" mod plays nicely with this mod, so -many overlays are possible with that in mind.~ -~ -Since there are only a handful of blocks the following pages will describe the specifics on each block if special features -exist. -~~~ -Carpenter's Block~ -~ -Left/Right click with the hammer to change the block into a slab. The direction you hit the block changes the orientation -of the slab. -~~~ -Carpenter's Slope~ -~ -This block is amazing. Remember that right clicking with a hammer will change the block (It has many options, try them out!) -while left-clicking will re-orient the block. -~~~ -Carpenter's Door/Hatch~ -~ -Right clicking with the hammer will change the appearance while left-clicking will make the door/hatch open to either the right -or the left (or in the hatch's case the top or the bottom as well). Shift right-clicking will make it behave like either -an iron door or a wooden door (default). Also, if you have two carpenter's doors side by side, opening/closing one will -make both open/close! -~~~ -Carpenter's Bed~ -~ -Right/Left clicking with the hammer will change the appearance of the bed-sheets/pillow to a few built in patterns. You can -still texture the frame of the bed (note it is two blocks so you will need two dye). Shift right-clicking will restore -the bed's pattern to default. -~~~ -Carpenter's Button/Lever/Pressure Plate~ -~ -Left clicking with the hammer will invert the redstone output. For the pressure plate right clicking with the hammer will -cycle through triggers so that the pressure plate will only be activated by mobs, animals, players, or everyone. -~~~ -Carpenter's Collapsible Block~ -~ -This block is affected by left clicking any corner of the block with the hammer, as the corner selected will depress by -one pixel (to a maximum of only one pixel left). Right-clicking raises it by one pixel. Only the top of the block will -compress this way, trying to make a roof out of these blocks is not a good idea. -~~~ -Carpenter's Barrier/Gate~ -~ -Right clicking with the hammer will rotate between a few textures. Shift right clicking while on the default fence will -alter the size of the gap in the fence by one pixel. -~~~ -Carpenter's Daylight Sensor~ -~ -Left clicking with a hammer will invert the redstone output. Left clicking will cycle between activating for sunset/sunrise -or when light levels are low enough for monsters to spawn. -~~~ -Carpenter's Ladder~ -~ -The only thing special about this block is that it can be free-floating (It acts as it's own block and doesn't have to -be placed on a wall). -~~~ -Carpenter's Safe~ -~ -Similar to the strongbox from Thermal Expansion, this item is linked to the user. Sneak right click with the hammer to -lock/unlock the safe so others can access it. Right click with the hammer to change automation rules (extraction is -allowed, not allowed, etc.)~ -~ -The green/red light indicates if the safe is unlocked/locked respectively. The blue bar indicates how full the safe is. -Holding a gold ingot and right clicking on the safe will upgrade it to 54 slots (double chest's worth). The only way -to get the gold back is to break the safe. -~~~ -Carpenter's Flower Pot~ -~ -Right click with some soil (dirt) to place it in the pot and allow plants to be placed in it. Covers are supprted, but so -are built in patterns (although not both simultaneously). Left/Right click with the hammer to cycle through the patterns. -Sneak right click with the hammer to reset it to default.~ -~ -Most plants can be planted in this flower pot, you are no longer limited to flowers and cacti. Sneak left click with the -hammer to remove the plant and sneak right click to remove the cover. - - ->Chisel, Chisel< -Chisel is a mod that adds decorative blocks to minecraft. It modifies existing blocks by use of a chisel to create -aesthetic blocks similar to the original one.~ -~ -Chisel adds two blocks to world-generation, marble and limestone. They are purely for looks.~ -~ -To get started first craft a chisel with two sticks and an iron ingot (diagonally in a crafting table). There are two ways -to use it, either in-world or in a crafting GUI. -~~~ -To bring up the GUI, right click the chisel while it is in you hotbar. Here you can place the block to modify -in the center. Try it out with cobblestone, stone, dirt or something else that you have on hand. You will notice that -blocks appear on the blank slots to the sides. To chisel the block in the center simply left click on the desired block -that appears on the sides.~ -~ -You can hover over the chiseled blocks to get a more detailed description of each one. Some blocks even have connected -textures! It should also be noted that if you have 32 blocks in the center and you choose a chiseled block all 32 will be -transformed! However, you can chisel an already chiseled block and most chisel recipes will let you use this mechanism to -get the vanilla item back from an existing chiseled block.~ -~~~ -To chisel a block in-game simply left click the block to be altered. Keep left-clicking on the block to cycle through -the available options. NOTE: THIS IS CURRENTLY BUGGED, IT WILL CREATE AN INVISIBLE BLOCK. IT IS RECCOMENDED YOU USE THE -GUI METHOD INSTEAD.~ -~ -There are also some special items that chisel adds:~ -The "Ball O' Moss" creates an Area of effect "explosion" that changes nearbly blocks into mossy versions of them.~ -The "Cloud in a bottle" will spawn a cloud when thrown/broken.~ -~ -Finally, there are additional chisel-able blocks that this mod adds. They can be found in NEI. - - ->ComputerCraft, ComputerCraft< - -**People looking at this book will mostly be new to CC so a link gives them other resources to learning Lua** -**Even though in-game documentation is better, in this case I think they will use the internet anyway** -**Feel free to document it anyway if you have time/want to though!** - ->DamageIndicators, Damge Indicators< -Damage indicators is a small mod that adds a HUD displaying the health of the entity the player is looking at.~ -~ -Additionally, you can adjust the settings by pressing "." - - ->DartCraft, DartCraft< -To get started in Dartcraft you must first find some power ore. It glows bright yellow and is found deep in the earth (or -in the Nether). Use it, alongside some ingots to craft a force ingot and a force nugget. Then craft these along with a stick -in a diagonal to gain a force rod. Right click a bookcase with the force rod to recieve the Book of Mudora, which will have -information on all things Dartcraft. - ->DimensionalAnchors, Dimensional Anchors< -This mod adds in only one block, the dimesional anchor. This block loads chunks (16x16 squares) for the player in order -to make automation possible even if the player is absent.~ -~ -To open the GUI right click the block. The red arrow will decrease the number of loaded chunks while the green arrow will -increase them. - ->EmasherResource, Emashers Resource< -Emasher Resource adds various ores and items to the game. It is meant to be an inclusion to the mod Engineer's Toolbox. -Emasher Resource includes algae, hemp, limestone, red sandstone, and emery ore.~ -~ -Algae can be harvested by hand and when "planted" in water it will spead to every nearby water source block. It can also -be harvested and burned in a photobioreactor to create hydrogen to be burned as an energy source.~ -~ -Hemp can be used for armor, string, paper, cactus green, and hemp seeds. The seeds can be crafted into hemp seed oil -which can be used as a fuel.~ -~ -Limestone can be used to make quicklime which is used in Engineer's Toolbox's ore processing.~ -~ -Emery ore is simply used to make the grinder (Engineer's Toolbox). It is about as rare as diamonds.~ -~ -Red Sandstone is aesthetic? - ->EnderIO, EnderIO< -Ender IO adds compact liquid conduits, energy conduits and redstone conduits, power generation, machinery, remote area -access, and more. This mod is similar to Thermal Expansion; it supports RF and MJ.~ -~~~ -Machines~ -~ -All Machines consume power (MJ, the bar on the left side of the GUI) and can be upgraded with capacitors to increase their -energy storage (and their speed/energy consumption)~ -~ -SAG Mill~ -This item acts as a pulverizer/macerator, grinding ores into dusts to increase output.~ -~ -Alloy Smelter~ -This item acts as both a normal smelter (smelting 3 items at once) as well as an alloy smelter to make special alloys for -Ender IO.~ -~ -Painting Machine~ -This item can texture either fused quartz frames or conduit facade with an overlaying block's texture. Place the block with -the desired texture in the left hand slot and the frame/facade in the right hand slot. -~~~ -Energy and Conduits~ -~ -Generators~ -~ -Stirling Generator~ -Your basic generator, burning items such as coal to create power. 10 RF/t.~ -~ -Photovoltaic Cell~ -A solar panel. It produces 10 RF/t in sunlight.~ -~~~ -Power Storage/Information~ -~ -Power Monitor~ -This item allows you to monitor the power of all items connected to your Ender IO power grid and it's peripherals (ex: TE machines). -This block has two tabs. One displays information about the network while the other tab is for restone engine control.~ -~ -Capacitor Bank~ -This blcok acts as a scalable power storage option (it can become a multi-block). Each block added to the structure will -add it's power storage and at 2, 4, and 8 blocks the power output flow rate will increase. -~~~ -Conduits~ -~ -All the conduits can exist in the same block as another Ender IO conduit(s), allowing for some very compact setups. In -addition, they can be covered with a painted conduit facade to cover them up. Holding a conduit or a Yeta Wrench will -render the conduit facades invisible, allowing you to easily find your conduits.~ -~ -The liquid conduit transfers fluids. The rate of transfer is dependent on the fluid.~ -The redstone conduit transmits a redstine signal. A lever/button can be attached to it or a conduit switch can be used. -To active the conduit switch right clicj one of the small squares on the end of the conduit.~ -The energy conduits transfer energy at varying capacities.~ -The item conduits tranfer items; the empowered conduit has more filtering options.~ -~ -Both the item and liquid conduits have a GUI which can be accessed by right clicking the square that appears when the condit -connects to an inventory. This can be used to set insert/extraction modes. ALternatively a yeta wrench can be used to control -the output mode without entering the GUI. -~~~ -The Dimensional Transceiver~ -~ -This item acts as a tessaract, with the ability to transfer liquids, items, and power across dimensions through a single -block (to another transceiver on the same frequency). It has frequency settings in the GUI and will automatically output -energy/items to adjacent conduits/inventories. -~~~ -Tools~ -~ -Power Probe~ -This item will give information about a machine or even a network when right clicked on a machine. It is similar to a -portable power monitor.~ -~ -Yeta Wrench~ -This item acts as a wrench, meaning it can pick up machines (except IC2 machines) by shift right clicking the machine. -It also can see through facades, and only certain facades, the filter is indicated in the bottom left hand corner of the -screen and can be altered by shift right clicking while not aiming at a machine.~ -~~~ -Other~ -~ -Reservoir~ -This item, when built in a 2x2x1 square, will act as an infinite water source, much like in vanilla minecraft. The reservoir -can also auto-eject if right clicked with a wrench.~ -~ -Powered Light~ -This item will emit light but will require .1 Mj/t (or 1 Rf/t) to operate. It must be turned on with a redstone signal.~ -~ -Fused Quartz~ -This item acts as aesthetic glass with connected textures. The frame can also be painted by right clicking with a painted -fuzed quartz frame. - - ->EnderProspecting, Ender Prospecting< -Ender Prospecting adds a couple items to assist with manual mining. They are the Eye of Prospecting, the Talisman -of Prospecting, and the Totem of Prospecting.~ -~ -The Eye of prospecting can be crafted alongside any ore and will then be "tuned" to this ore. The next time you right -click the eye it will fly away from you, much liek an eye of ender, except it will fly toward the tuned ore. It will -then break, this item is one-time-use.~ -~ -The (Base) Talisman of Prospecting can be crafted with 5 tuned eyes to yield a tuned Talisman. It acts similarly to the -Eye, except it is reusable and has a smaller range. Every time the Talisman is right clicked it will indicate a direction -that the tuned or is.~ -~ -The Totem of Prospecting can be crafted/tuned similarly to the Talisman. It doesn't require being right clicked, but it -has an even smaller range and doesn't indicate a direction, only that the ore is in close proximity. - - ->EnderStorage, Ender Storage< -Ender Storage adds the Ender chest, the ender tank and the ender pouch. Each chest/pounch and tank will link to each other -assuming they are on the same "frequency" (indicated by the wool pads on top). The pads can be colored with each dye, -either in-game by clicking on the pads with a dye in hand, or by crafting the item below the dye frequency in a crafting -table.~ -~ -Ender pouches are merely a portable form of ender chests and can be linked to ender chests if they share the same frequency. -If you lose an ender item with item(s)/liquid(s) stored in it, they will remain stored in the chest with the frequency -they were stored in.~ -~ -If you place a diamond in the latch of an ender chest it will become linked to the player that placed the placed the -diamond, meaning that each player in a SMP server can have access to all 4096 frequencies. - - ->EngineersToolbox, Engineer's Toolbox< - - -**>ExtraBees, Extra Bees<** - ->ExtraCells, Extra Cells< - - -**>ExtraTrees, Extra Trees<** - ->ExtraUtilities, Extra Utilities< -Extra Utilities adds a bunch of useful blocks. It even adds it's own in game-documentation! Simply press use ("u") while -in NEI while hovering over an extra utilities block to see a description of the block. - ->Factorization, Factorization< - - ->FlatSigns, FlatSigns< -Flat signs alters existing signs in Minecraft by allowing flat versions of signs to be placed on the floor or the ceiling -by shift right clicking a sign on the floor/ceiling.~ -~ -It also allows for signs to be edited by using a sponge or the more durable sponge wipe. To craft a sponge just throw yellow -wool into water or on the ground while it is raining. - ->Forestry-Machines, Forestry-Machines< - - ->Forestry-Bees, Forestry-Bees< - - ->Forestry-Trees, Forestry-Trees< - - ->GasCraft, GasCraft< - - ->Gendustry, Gendustry< -Gendustry is a mod that acts as an add-on for Forestry's bee and tree (and butterfly) breeding systems. It adds a number -of blocks that will be discussed on the following page(s).~ -~ -Each block can accept EU, MJ, or RF. All blocks can input/output from any side. -~~~ -The Industrial Apiary~ -~ -This block requires 2 MJ/t to operate, has 4 slots for upgrades (but doesn't support frames), and also doesn't have the -90% production reduction of normal apiaries.~ -~ -The gague on the left is for power storage. The left slots are for a Queen/Princess and Drones, the middle 4 slots are for -upgrades, and the right 9 slots are for products and offspring.~ -~ -You can hover over the status icon (in the top right) to see more information about the block.~ -~ -Bees can be inserted and products can be extracted from any side. Upgrades cannot be automated, but the automation upgrade -will automatically move offspring back into the left slot to continue breeding~ -~ -The upgrades for gendustry are described by hovering over them in NEI. -~~~ -The Mutagen Producer~ -~ -This item will convert solid items into Mutagen (a liquid used to mutate bees/trees in the Mutatron).~ -~ -Items can be inserted into any side, and liquids will be automatically ejected to any adjacent pipe or tank.~ -~ -The items that are used as valid fuel sources are, in decreasing order of effectiveness, uranium, glowstone, and then -redstone. CLick on the recipes bar in the machine to see the detailed values for each item (power needed, mutagen produced). -~~~ -The Mutatron/Advanced Mutatron~ -~ -The Muatron consumes Mutagen to force mutations. It requires 1 bucket of mutagen (1000mb), 20,000 MJ per operation, and -a labware.~ -~ -The gauges on the left are for internal power and mutagen storage. For bees, princesses go in the top slot and -drones go in the bottom slot. For trees, saplings go in the top slot and pollen goes in the bottom slot. If a bee is -being mutated, the resulting bee will be a pure-bred bee. Ignoble bees have a 10% chance of not surviving the process.~ -~ -Bees and labware can be inserted from any side and results can be extracted from any side.~ -~ -The advanced mutatron allows a selection of mutation if there are multiple possible results. It can work twice as fast if -the energy supply is adequate. -~~~ -The Genetic Sampler/Imprinter~ -~ -Takes genetic samples from Bees, Trees, or even Butterflies, randomly selecting one genetic trait from the input and killing -the sampled creature in the process. It can also convert Extra-Bees serums into gendustry samples~ -~ -It consumes labware (top right) and blank samples (top left), as well as 20,000 MJ per operation.~ -~ -To use the samples, craft them with a template (shapeless receipe, any number of samples can be added at once). Every chromosome -(ex: fertility, species, etc.) can only be added once to a template, any additions will overwrite previous samples. All -samples must belong to the same species (ex: no using tree species on a bee). Unneeded templates/samples can be cleaned -by applying heat (ex: putting them in a furnace).~ -~ -The implanter replaces the traits of the input bee with the traits on the template (top left slot).~ -~ -It 80,000 MJ and a labware (top right slot) per operation. The template will not be consumed (or altered). Ignoble bees -have a 10% chance to not survive the process.~ -~ -The template can be removed form any side, but only when no imprinting is ongoing and the input slot is empty. -~~~ -The Industrial Grafter~ -~ -Acts as a powered Forestry grafter, that is very fast but also comsumes a lot of power.~ -~ -It can be charged in any machine that will charge MJ, RF, or tier 2 or higher EU (ex: capacitor bank, energetic infuser, -MFE). - - ->GregTech, GregTech< - -**GregTech is far, far too complex for Minecraft's Written Book format.** -**I think the only way to provide support for that mod is either a wiki link** -**Or a book format resembling Thaumcraft's or RotaryCraft's.** - ->GraviSuite, Gravitation Suite< -Gravitation Suite (Gravi Suite) is an addon for IC2 which adds very expenive, but powerful, EU-powered items. It adds both -tools and armor. -~~~ -Armor~ -~ -The Gravi-Chest Plate~ -~ -This item contains all of the functionality of the quantum chest plate as well as additional fucntions. It -provides creative mode flight and the ability to charge any EU items in your inventory. To toggle on/off flight, press 'f'. -To toggle on/off boost mode press 'ctrl'. This item also has 'hover mode'. This will allow you to fly much faster at an increased energy cost. The Gravi -Chest Plate can be charged in a MFSU or higher tier EU storage.~ -~ -Advanced Elextric Jetpack~ -~ -This item combines the electric jetpack and the advanced lappack. This item also has boost mode, hover mode, and, -obvioulsy, flight, as well as 1,000,00 EU energy storage.~ -~ -The Ultimate Solar Helmet~ -~ -This combines the ultimate hybrid solar panel from advanced solar panels with the quantum helmet to charge your armor at 512 EU/t -while still retaining the functionality of the quantum helmet.~ -~ -The Ultimate lappack~ -~ -This item holds 10,000,000 EU. -~~~ -Tools~ -~ -The tools can all be charged in a MFE or higher.~ -~ -The Vajra~ -~ -Thsi item can break any block (including bedrock) in one hit, even when flying or swimming, but it costs a very, very large -amount of EU per block broken~ -~ -Advanced Drill~ -Thsi drill is 35% faster than the diamond drill but it consumes significantly more power.~ -~ -Advanced Chainsaw~ -This chainsaw has a higher damage (12) than the normal chinsaw and it also operates 35% faster. - ->HardcoreEnderExpansion, Hardcore Ender Expansion< - - ->ImmibisMicroblocks, Immibis Microblocks< -Immibis Microblocks (along with Forge Multipart) creates the ability to cut down blocks into parts. This allows multiple -parts of blocks to exist in the same 1-block space, which wouldn't otherwise be possible. For example, torches are now -multiparts and so 2 of them can exist on the same intersection of a two walls. As another example, Thermal Expansion -pipes/conduits are multiparts, so a cover can be placed on them to "hide" the wiring while still retaining the -aesthetics of your house.~ -~ -To create multiparts simply craft a saw and then follow the NEI instructions to creaft your desired shape/size!~ -~ -Note: A large number of microblocks may cause lag. As long as you don't go beserk with them you should be fine though. - - -**>IndustrialCraft, IndustrialCraft (Experimental)<** -**Someone in the thread (Burn447) mentioned he was working on this** - ->Infinibows, Infinibows< -Infinibows is a small mod that just removes the need to have an arrow in your inventory to shoot a bow with the infinity -enchant. - ->LogisticsPipes, Logistics Pipes< - - ->MagicalCrops, Magical Crops< - - ->MagicBees, Magic Bees< -Magic bees is an addon for the Forestry bee-breeding system that also utilizes Thaumcraft. As a result, all of the information -for this mod can be found under the Magic Bees tab in the Thaumonomicon. If you are confused about bees in general, please -consult the "Forestry-Bees" book. - ->Mariculture, Mariculture< - - ->Mekanism, Mekanism< - - ->MFFS, Modular ForceField Systems< - - ->MFR, MineFactory Reloaded< -MineFactory Reloaded is a vast mod, comprising many useful -machines and automation devices. From conveyor belts to tree farms, -there is something in MFR for everybody.~ -~ -To get started, most of the MFR machines require rubber. Rubber trees are -generated throughout the landscape. Break the wood to acquire the flexible -material, then smelt it into rubber bars, and then again into raw plastic. -This plastic can then be crafted into sheets of plastic, which are the foundation -for most of the machines. -~ -Authors: Powercrystals, skyboy026 - ->ModularPowersuits, Modular Powersuits< - - ->Morph, Morph< -Morph is a mod that allows you to take on the characteristics (shape/size/ability(s)) of any creature you kill (except -bosses, although that is a config option).~ -~ -The flight ability is not able to be used until you reach the Nether, and do note that you will lose your morphs on death.~ -~ -To access your morphs, press "[" or "]", and then scroll down. Press "Enter" to select your morph.~ -~ -Morph also has a wheel for your favorite morphs, accessed by pressing "~"/"`". To add a morph to your favorites, press -the same key, "~", while selecting the desired morph in the menu. - ->MPSA, Modular Powersuits Addons< - - ->MystCraft-WritingAges, MystCraft-Writing< - - ->MystCraft-General, MystCraft-General<** - - ->Natura, Natura< -Natura adds world-generation, mainly in the form of some additional trees and some new blocks.~ -~ -The most notable are the berry bushes. These are found in the wild and will grow up and out and will produce berries -that can be harvested by right clicking on the bush. The berries don't fill your hunger very much, but they will -increase your saturation (a hidden value that determines when you will become hungry again), and you can even eat the -berries when full to max out your saturation.~ -~ -This mod also adds in generation to the Nether, allowing you to make bows that have a higher durability than vanilla ones.~ -~ -This mod also adds in cotton plants. These will grow until white balls appear on the plant, then can be harvested and will -revert to an earlier stage of growth rather than having to be replanted.~ -Finally, wheat/barley (wild form of wheat) can be crafted shapelessly into flour, which can then be smelted into bread. - ->NEI, Not Enough Items< -Not Enough Items (or NEI for short) adds the menu you see on your screen when opening your (or any) inventory. It is primarilly -used to show how to craft items and what items are used for. It can be disabled/hidden by pressing "o".~ -~ -To use NEI, hover over an item in the menu and press "r" for recipe to bring up how to make that item or press "u" for -use or what that item is used for. You will notice you also have a search bar on the bottom slot of your screen. This -can be used to limit the results shown on the right hand side tab. Double clicking the search bar will highlight results -that match whatever is typed into the search bar. Double clicking it agin will reset it.~ -~ -The left hand side of your screen contains saves, you can store your inventory in this save, and then loading it will -replace your inventory with the saved one (if cheat mode is enabled). In the top left you will see many options. Most -are self-explanatory, but the one you will likely use the most is next to the magnet; it will change your game mode.~ -~~~ -Options/NEI Modes~ -~ -At the bottom left you will see "options". Clicking on that will bring you to another menu screen. The most useful one -is the topmost one, "Inventory". There you can change between "recipe mode", "cheat mode", and "utility mode". Utility -mode will let you use the utilities in-game. Recipe mode will, when you left click an item on the main NEI panel, do the -same thing as pressing "r", while right clicking will do the same thing as pressing "u". Cheat mode will allow you to -obtain any number of items from the main NEI panel by clicking on them. Left clicking will give you 64 (a stack) of items, -while right clicking will give you one of the selected item. While in cheat mode you can drag items to the right hand -panel to delete them. -~~~ -Tips/Tricks~ -~ -Type in "@modnamehere" to see all the items from a specific mod.~ -You can right click the search bar to instantly clear it!! -In any crafting inventory, left clicking on the little '?' will overlay ghost images on the crafting grid to make it easy -to see what components go where. Shift left clicking will, if you have the items in your inventory, automatically put them -in the crafting grid in the correct location(s). - ->NetherOres, Nether Ores< -Nether ores adds ore generation to the Nether. These ores have a higher yield than their overworld counterparts, but -they also have a propesity to explode, so caution is necessary. - ->NotEnoughKeys, Not Enough Keys< -This mod adds a key-binding menu so it is more simple to navigat through the mess of conflicting keybinds. To access it -simply go into options -> controls and then modify as you see fit. - ->NuclearControl, Nuclear Control< - - ->ObsidiPlates, Obsidian Pressure Plates< -This mod adds a few pressure plates to the game.~ -~ -Obsidian Pressure Plates~ -Will only give off a redstone signal if a player is standing on them.~ -~ -Mossy Cobblestone Pressure Plates~ -Will only give off a signal if a NPC (ex: a villager) is standing on them.~ -~ -Both pressure plates can be silent (no clicking sound) and shrouded (see-through). It should be noted that to create a -silent and shrouded pressure plate you must apply silent first and then shrouded. - -**>OpenBlocks, OpenBlocks<** - ->OpenPeripheral, OpenPeripheral< -Open peripheral is an addon for ComputerCraft. It allows you to wrap a variety of items as peripherals.~ -~ -To see if an item is a valid peripheral (and to get the commands for it) do the following:~ -"side" is the side of the computer that the item to be wrapped as a peripheral is located (ex: "left", "top", etc). -The side should be enclosed in quotation marks.~ -p = peripheral.wrap("side")~ -print (p.listMethods())~ -~ -There are also some items that this mod adds, explained in the following page(s). -~~~ -PIM~ -This item allows you to access a player's inventory (if he/she) is standing on it.~ -~ -Sensor~ -This item allows you to scan the nearby area for information. Use listMethods() for more information.~ -~ -Peripheral Proxy~ -This item allows you to wrap certain items as peripherals through a modem. Make sure the arrows are facing the item to be -wrapped and the modem is on and is located on the back of the proxy.~ -~ -Ticket Machine~ -This item can be used to print out tickets for Railcraft.~ -~ -Terminal Glasses/Termianl Glasses Bridge~ -The glasses can be worn by a player and the information passed to the bridge will appear on the player's HUD.~ -~ -Duck Antenna~ -No idea :P - ->PluginsForForestry, Plugins for Forestry< -Plugins for forestry adds compatability between forestry and other mods. It adds the ability to use sugar and cactus in -a coke oven (railcraft) to make sugar/coal charcoal/coke for power. - ->PortalGun, Portal Gun< - - ->ProjectRed, Project Red< - - -**>QuarryPlus, Quarry Plus<** - ->Railcraft-Rails, Railcraft< - - ->Railcraft-Other, Railcraft-Other< - - ->RCDusts, RCDusts< -This mod adds metal dusts and recipes to the Railcraft rock crusher to -make it a fully capable ore processing machine, as well as adding several -tweaks for compatibility and some useful dust and railcraft-related configuration options. - ->RedstoneArsenal, Redstone Arsenal< -Redstone Arsenal adds tools and weaponry which harness the power of Redstone Flux, the -energy system added by Thermal Expansion. - ->Reliquary, Reliquary< - -**Outdated source but I don't think a lot has changed, it was merely ported to 1.6** - ->RemoteIO, RemoteIO< -Remote IO is a mod that allows you to link IO blocks to inventories, you are no longer limited to just 6 sides!~ -~ -For documentation on specific items simply craft the "Documentation Screen" and place any Remote IO item in the top -right hand slot to read a description on the block. - ->StevesCarts, Steve's Carts 2< - - ->StevesFactoryManager, Steve's Factory Manager< - - ->Thaumcraft, Thaumcraft 4< -Thaumcraft is a magical mod that requires you to "research" its items before you can craft them.~ -~ -There's all kinds of magical swag that you can build and play with, but it's probably best for you to -learn about it on your own.~ -~ -To get started, craft a iron capped wooden wand, -place a bookshelf on the ground, and right-click your wand on it.~ -~ -It should transform into a Thaumonomicon; the true guidebook for Thaumcraft!~ -~ -The only thing to know that is not documented in the book is that some research will be impossible, you can throw it -away and restart with newly generated research notes at any time though. - ->ThaumicTinkerer, Thaumic Tinkerer< -Thaumic Tinkerer is an addon to Thaumcraft (a magical mod). All the information is documented in the Thaumonomicon. - ->ThermalExpansion, Thermal Expansion 3< -Thermal Expansion (TE) is a "technology" mod that adds a power system called Redstone Flux (RF). -It has itemducts, fluiducts, and energy conduits for transporting items, liquids, and RF power -respectively, as well as a bunch of useful blocks for ore processing, automatic crafting, storage, and more.~ -~ -You can start generating RF power using the mod's dynamos and some energy conduits, with leadstone conduits being the -lowest tier. All TE conduits convert RF to MJ (Buildcraft energy) if needed. -You can rotate and pick up machines by right clicking and shift right clicking with a Crescent Hammer, -the mod's version of a wrench.~ -~~~ -All machines in the mod have their own configuration settings in their GUIs.~ -~ -The redstone behavior tab lets you choose how the machine will respond to redstone.~ -The configuration tab lets you choose where the machine will input and output its products, -be that energy, liquids, or power, on a per block face basis.~ -~ -Blue indicates an input on a given face, while orange indicates an output.~ -There are other colors used situationally depending on the machine. -For these, it's best to select that color in the configuration menu, then look -back at the main GUI of the machine.~ -The slot in the machine associated with that color will -be highlighted in that color. This should help indicate what that color's purpose is -for that particular machine. -~ - ->TinkersConstruct, Tinkers' Construct< -Tinkers' Construct is a mod that lets you build custom tools out of -various materials, each with their own special properties.~ -~ -To get started with the basics, check out the book "Materials And You" that -you should have spawned with. -~ - ->TinkersMechworks, Tinkers' Mechworks< -Tinker's Mechworks is an addon for Tinkers' Construct. It adds drawbridges, an igniter, and signal busses/terminals, all -of which are described on the following pages. -~~~ -Drawbridge~ -~ -The drawbridge can extend and retract 15 blocks in the direction it is facing. It is activated with a redstone signal. -The left slot is for a block that "disguises" the drawbridge to make it look like the block in the left slot. -The right slot is for the blocks that are to be extended/retracted.~ -~ -The extended drawbridge can extend up to 64 blocks.~ -~ -The advanced drawbridge can extend more than one type of block, as each block is placed in the GUI. -~~~ -Igniter~ -~ -The igniter will light the block in front of it on fire when given a redstoen signal and will extinguish the flame when -the resdtone signal is turned off. -~~~ -Signal Bus/Terminal/Wire~ -~ -These items function as redstone that can travel through blocks. To get started, craft a spool of wire by surrounding a -stone tool rod with 8 lengths of wire in a crafting table. The spool of wire can be crafted with additional lengths of wire -(up to 8 at a time maximum) to give the length of wire more length. The damage bar underneath the length of wire visually -represents how much wire is left.~ -~ -The spool of wire (truly the wire itself) is used to connect signal terminals to signal busses and back to signal terminals. -To connect the two right click on the top red part of the terminal with the spool of wire and then right click on the -signal bus with the same spool of wire. If you have enough wire and the terminal and the bus are 15 or less blocks away -you should see a small red line connecting the two. If you move your cursor away from the spool of wire on your hotbar the -red line will dissapear visually. Now you can connect the second terminal to the bus, using the length of wire, to -complete the circuit. -~~~ -Signal Bus/Terminal/Wire (continued)~ -~ -A redstone signal can be applied to the terminal (or the block the terminal is placed upon) and the redstone signal will -be transmitted to the terminal at the end of the wire. A terminal can connect to multiple busses but busses cannot connect -to other busses.~ -~ -Right clicking the white part of a signal terminal with an open hand will change the terminal's color. Only terminals of -the same color will send redstone signals. - ->TPPITweaks, TPPI Tweaks< -TPPITweaks is the mod made especially for the TPPI Modpack, -which is the representative modpack for /r/feedthebeast.~ -~ -It contains many tweaks for mods to better improve balance, -and some helpful objects to better guide -~~~ -the player in the modpack.~ -~ -Authors: wha-ha-ha, tterrag - ->Translocators, Translocators< -The Translocators mod adds 2 items to the game, the translocators themselves and a crafting grid.~ -~ -Translocators allow for the movement of items through a 1-block space. More info is on the following page.~ -~ -The crafting grid can be accessed by pressing 'c' (configurable in keybinds) and will bring up a grid to place items in. -Right click to place/remove items and press 'c' again on the grid to craft the item(s). -~~~ -Translocators can be placed on the side of an inventory/machine/tank. There are both item and liquid translocators.~ -~ -Right clicking on the protruding center of the translocator with an open hand will depress the center. Items/liquids will -always flow from the translocator with a protruding center to the translocator(s) with an inset center.~ -~ -Right clicking on the plate of the item translocator brings up a configurable filter. -~~~ -Adding a diamond nugget (a diamond in a crafting table gives 9) puts a translocator in regulate mode. -In this mode it will maintain a certain amount of items set in the filter in the inventory it’s attached to. -On an inserting face, it will only accept items to fill the inventory to the matching filter. -On an ejecting face, it will eject any items that don’t match the filter.~ -~ -Adding glowstone to the plate makes it transfer stacks at a time. -Adding redstone lets you toggle input/output with a redstone signal.~ -~ -Adding an iron ingot makes the translocator emit redstone signals to the attached inventory on certain conditions. -On an inserting face, it will emit if there is no room for any item that matches the filter. -On an ejecting face, it will emit if there is no place where any item can be put that matches the filter.~ -~ -Shift-Right clicking on the plate will strip and drop all upgrades placed on the translocator. -~~~ -Translocators will follow these rules:~ -~ -Items/liquids will always travel to non-redstone outputs if they can.~ -Items/Liquids will be evenly split between available outputs. Items will be taken from the slot with the largest quantity. - ->TwilightForest, Twilight Forest< - - ->Waila, Waila< -WAILA stands for "What Am I Looking At?" It introduces a HUD tooltip which indicates what block you are looking at. -It tells you the block name and what mod it is from.~ -~ -By adding the tooltip for the mod name in NEI you can now search "railcraft" instead of "@railcraft" to get the items -added by railcraft.~ -~ -It also adds some tooltip values for various items (ex: shows how much heat coal can produce in a firebox)~ -~ -There are also, by default, some (numpad) keybinds that can be used -as well:~ -1: Toggles on and off the HUD~ -2: Toggles on and off showinq liquids~ -3: Shows the uses for the item slected (through NEI)~ -4: SHows how the item selected can be used (through NEI)~ - ->Witchery, Witchery< -Witchery is a magical mod. It has it's own in-game documentation. To access it, type "Witchcraft" into NEI and then -obtain the books shown. The first one you will want to get is "Herbology" and then "Collectign Fumes." From there on it -is self-explanatory. -**** - ->WRCBE, Wireless Redstone - CBE< -At it's core Wireless Redstone ChickenBones Edition (WR-CBE) is a very simple mod; it allows you to wirelessly transmit -redstone signals. It even works across dimensions!~ -~ -For the items besides the wireless transmitter/receiver and the wireless remote I reccomend you check out ChickenBones' -Minecraft Forum page. He also describes SMP permissions commands on that post. However, The items stated above (the -only ones you will likely use) will be explained on the following page(s). -~~~ -Wireless Transmitter/Receiver~ -~ -Right click on the block to open the inventory. You can set a frequency for the redstone signal to transmit/receive from. -You can also access the advanced tab from here.~ -~ -In the advanced tab you will notice that you can add/remove names whick you can link to certain frequencies. This makes it -simple to remember what your different frequencies do and it is easy to switch back and forth between them.~ -~ -On the right you will notice a GUI that says Phase shift and some arrows. This allows you to color some frequencies with -vanilla dyes. Note: This is purely for easy identification, it does not affect the technical properties! -~~~ -Extra Info:~ -~ -The wireless remote is simply a portable wireless transmitter. It's gui can be opened by right-clicking.~ -~ -WR-CBE has ComputerCraft support. Wrap it as a peripheral and then use peripheral.getFreq(frequency) or -peripheral.setFreq(Frequency) - - ->ZansMinimap, Zan's Minimap< -Zan's Minimap (Voxel Map) provides the player with a convenient mini-map located in the top right hand corner of the -screen. It provides a variety of features.~ -~ -Adds an in-game waypoint system (that can show the location of your latest death).~ -~ -Adds a radar that can show a customizable number of mobs, animals, and players.~ -~ -The default key to access the menu is "M". There you can customize the look of your mini-map, configure the other keybinds -for the mod, change the radar/waypoints, and more. diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 6973d09..43ea018 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "TPPITweaks", "name": "TPPI Tweaks", "description": "Does some useful stuff for the TPPI modpack.", - "version": "1.0.0", + "version": "${version}", "mcversion": "1.6.4", "authors": [ "The TPPI Team" ], "requiredMods": [ "Forge" ]