diff --git a/src/main/java/forestry/core/gadgets/TileMachine.java b/src/main/java/forestry/core/gadgets/TileMachine.java index 8ba815885..f20b60935 100755 --- a/src/main/java/forestry/core/gadgets/TileMachine.java +++ b/src/main/java/forestry/core/gadgets/TileMachine.java @@ -163,7 +163,7 @@ public abstract class TileMachine extends TileForestry implements ISpecialInvent millMap.put(Defaults.ID_PACKAGE_MILL_TRADER, PluginMail.definitionTradestation); millMap.put(Defaults.ID_PACKAGE_MILL_PHILATELIST, PluginMail.definitionPhilatelist); millMap.put(Defaults.ID_PACKAGE_MILL_APIARIST_CHEST, PluginApiculture.definitionChest); - millMap.put(Defaults.ID_PACKAGE_MILL_ANALYZER, PluginCore.definitionAnalyzer); + millMap.put(Defaults.ID_PACKAGE_MILL_ANALYZER, PluginApiculture.definitionAnalyzer); millMap.put(Defaults.ID_PACKAGE_MILL_RAINMAKER, PluginFactory.definitionRainmaker); definitionMap.put(ForestryBlock.factoryPlain.block(), millMap); diff --git a/src/main/java/forestry/food/items/ItemInfuser.java b/src/main/java/forestry/food/items/ItemInfuser.java index 171d9a27e..0cfed0b87 100755 --- a/src/main/java/forestry/food/items/ItemInfuser.java +++ b/src/main/java/forestry/food/items/ItemInfuser.java @@ -29,6 +29,7 @@ import forestry.core.items.ItemForestry; import forestry.core.network.GuiId; import forestry.core.proxy.Proxies; import forestry.food.BeverageEffect; +import forestry.plugins.PluginManager; public class ItemInfuser extends ItemForestry { @@ -389,9 +390,11 @@ public class ItemInfuser extends ItemForestry { } public static void initialize() { - BeverageManager.ingredientManager.addIngredient(ForestryItem.pollenCluster.getItemStack(1, 0), "Strong Curative"); - BeverageManager.ingredientManager.addIngredient(ForestryItem.pollenCluster.getItemStack(1, 1), "Weak Curative"); - BeverageManager.infuserManager.addMixture(1, ForestryItem.pollenCluster.getItemStack(1, 0), BeverageEffect.strongAntidote); - BeverageManager.infuserManager.addMixture(1, ForestryItem.pollenCluster.getItemStack(1, 1), BeverageEffect.weakAntidote); + if (PluginManager.Module.APICULTURE.isEnabled()) { + BeverageManager.ingredientManager.addIngredient(ForestryItem.pollenCluster.getItemStack(1, 0), "Strong Curative"); + BeverageManager.ingredientManager.addIngredient(ForestryItem.pollenCluster.getItemStack(1, 1), "Weak Curative"); + BeverageManager.infuserManager.addMixture(1, ForestryItem.pollenCluster.getItemStack(1, 0), BeverageEffect.strongAntidote); + BeverageManager.infuserManager.addMixture(1, ForestryItem.pollenCluster.getItemStack(1, 1), BeverageEffect.weakAntidote); + } } } diff --git a/src/main/java/forestry/plugins/PluginApiculture.java b/src/main/java/forestry/plugins/PluginApiculture.java index d277aef7c..9aae83fcd 100644 --- a/src/main/java/forestry/plugins/PluginApiculture.java +++ b/src/main/java/forestry/plugins/PluginApiculture.java @@ -21,6 +21,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.util.IIcon; @@ -136,6 +137,7 @@ import forestry.core.config.ForestryItem; import forestry.core.config.Property; import forestry.core.gadgets.BlockBase; import forestry.core.gadgets.MachineDefinition; +import forestry.core.gadgets.TileAnalyzer; import forestry.core.genetics.Allele; import forestry.core.interfaces.IOreDictionaryHandler; import forestry.core.interfaces.IPacketHandler; @@ -178,6 +180,7 @@ public class PluginApiculture extends ForestryPlugin { public static MachineDefinition definitionApiary; public static MachineDefinition definitionChest; public static MachineDefinition definitionBeehouse; + public static MachineDefinition definitionAnalyzer; @SuppressWarnings({"unchecked", "rawtypes"}) @Override @@ -221,6 +224,9 @@ public class PluginApiculture extends ForestryPlugin { 'C', "beeComb")) .setFaces(0, 1, 2, 2, 4, 4, 0, 7)); + definitionAnalyzer = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ANALYZER_META, "forestry.Analyzer", TileAnalyzer.class, + PluginApiculture.proxy.getRendererAnalyzer(Defaults.TEXTURE_PATH_BLOCKS + "/analyzer_"))); + ForestryBlock.beehives.registerBlock(new BlockBeehives(), ItemForestryBlock.class, "beehives"); ForestryBlock.beehives.block().setHarvestLevel("pickaxe", 1, 0); ForestryBlock.beehives.block().setHarvestLevel("scoop", 0, 1); @@ -295,9 +301,11 @@ public class PluginApiculture extends ForestryPlugin { registerTemplates(); + definitionAnalyzer.register(); definitionApiary.register(); definitionBeehouse.register(); definitionChest.register(); + GameRegistry.registerTileEntity(TileAlvearyPlain.class, "forestry.Alveary"); GameRegistry.registerTileEntity(TileSwarm.class, "forestry.Swarm"); GameRegistry.registerTileEntity(TileAlvearySwarmer.class, "forestry.AlvearySwarmer"); @@ -689,6 +697,15 @@ public class PluginApiculture extends ForestryPlugin { RecipeManagers.fermenterManager.addRecipe(ForestryItem.honeydew.getItemStack(), 500, 1.0f, LiquidHelper.getLiquid(Defaults.LIQUID_MEAD, 1), LiquidHelper.getLiquid(Defaults.LIQUID_HONEY, 1)); + // ANALYZER + definitionAnalyzer.recipes = createAlyzerRecipes(ForestryBlock.core.block(), Defaults.DEFINITION_ANALYZER_META); + } + + public IRecipe[] createAlyzerRecipes(Block block, int meta) { + ArrayList recipes = new ArrayList(); + recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.beealyzer, 'X', "ingotBronze")); + recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.treealyzer, 'X', "ingotBronze")); + return recipes.toArray(new IRecipe[recipes.size()]); } private void registerBeehiveDrops() { diff --git a/src/main/java/forestry/plugins/PluginArboriculture.java b/src/main/java/forestry/plugins/PluginArboriculture.java index b4165c86a..3de888bf4 100644 --- a/src/main/java/forestry/plugins/PluginArboriculture.java +++ b/src/main/java/forestry/plugins/PluginArboriculture.java @@ -302,9 +302,11 @@ public class PluginArboriculture extends ForestryPlugin { ForestryItem.sapling.registerItem(new ItemGermlingGE(EnumGermlingType.SAPLING), "sapling"); OreDictionary.registerOre("treeSapling", ForestryItem.sapling.getItemStack(1, -1)); - ForestryItem.pollenFertile.registerItem(new ItemGermlingGE(EnumGermlingType.POLLEN), "pollenFertile"); + if (PluginManager.Module.APICULTURE.isEnabled()) { + ForestryItem.pollenFertile.registerItem(new ItemGermlingGE(EnumGermlingType.POLLEN), "pollenFertile"); + ForestryItem.treealyzer.registerItem(new ItemTreealyzer(), "treealyzer"); + } - ForestryItem.treealyzer.registerItem(new ItemTreealyzer(), "treealyzer"); ForestryItem.grafter.registerItem(new ItemGrafter(4), "grafter"); ForestryItem.grafterProven.registerItem(new ItemGrafter(149), "grafterProven"); @@ -995,11 +997,13 @@ public class PluginArboriculture extends ForestryPlugin { ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.SAPLING), 1, 2, 4)); ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.SAPLING), 1, 2, 4)); - ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); - ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); - ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); - ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.POLLEN), 1, 2, 3)); - ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3)); + if (PluginManager.Module.APICULTURE.isEnabled()) { + ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); + ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); + ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.POLLEN), 2, 3, 4)); + ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.POLLEN), 1, 2, 3)); + ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3)); + } } private ItemStack getTreeItemFromTemplate(IAllele[] template, EnumGermlingType type) { diff --git a/src/main/java/forestry/plugins/PluginCore.java b/src/main/java/forestry/plugins/PluginCore.java index 6c0b6472c..339d561a4 100755 --- a/src/main/java/forestry/plugins/PluginCore.java +++ b/src/main/java/forestry/plugins/PluginCore.java @@ -79,7 +79,6 @@ import forestry.core.utils.ShapedRecipeCustom; @Plugin(pluginID = "Core", name = "Core", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.core.description") public class PluginCore extends ForestryPlugin { - public static MachineDefinition definitionAnalyzer; public static MachineDefinition definitionEscritoire; // ICrashCallable for highlighting certain mods during crashes. public static ForestryModEnvWarningCallable crashCallable; @@ -103,8 +102,6 @@ public class PluginCore extends ForestryPlugin { ForestryBlock.core.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "core"); - definitionAnalyzer = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ANALYZER_META, "forestry.Analyzer", TileAnalyzer.class, - PluginApiculture.proxy.getRendererAnalyzer(Defaults.TEXTURE_PATH_BLOCKS + "/analyzer_"))); definitionEscritoire = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ESCRITOIRE_META, "forestry.Escritoire", TileEscritoire.class, Proxies.render.getRenderEscritoire())); @@ -127,9 +124,7 @@ public class PluginCore extends ForestryPlugin { @Override public void doInit() { super.doInit(); - definitionAnalyzer.recipes = createAlyzerRecipes(ForestryBlock.core.block(), Defaults.DEFINITION_ANALYZER_META); - definitionAnalyzer.register(); definitionEscritoire.register(); crashCallable = new ForestryModEnvWarningCallable(); @@ -466,16 +461,4 @@ public class PluginCore extends ForestryPlugin { } }; } - - public IRecipe[] createAlyzerRecipes(Block block, int meta) { - ArrayList recipes = new ArrayList(); - if (ForestryItem.beealyzer != null) - recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.beealyzer, 'X', "ingotBronze")); - - if (ForestryItem.treealyzer != null) - recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.treealyzer, 'X', "ingotBronze")); - - return recipes.toArray(new IRecipe[0]); - } - } diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java index 5d65c5288..211c48ba9 100755 --- a/src/main/java/forestry/plugins/PluginFactory.java +++ b/src/main/java/forestry/plugins/PluginFactory.java @@ -22,7 +22,6 @@ import cpw.mods.fml.common.network.IGuiHandler; import forestry.api.recipes.ICraftingProvider; import forestry.api.recipes.RecipeManagers; import forestry.core.GameMode; -import forestry.core.config.Config; import forestry.core.config.Defaults; import forestry.core.config.ForestryBlock; import forestry.core.config.ForestryItem; @@ -40,7 +39,6 @@ import forestry.core.utils.ShapedRecipeCustom; import forestry.factory.GuiHandlerFactory; import forestry.factory.gadgets.MachineBottler; import forestry.factory.gadgets.MachineCarpenter; -import forestry.factory.gadgets.MachineCarpenter.RecipeManager; import forestry.factory.gadgets.MachineCentrifuge; import forestry.factory.gadgets.MachineFabricator; import forestry.factory.gadgets.MachineFermenter; @@ -274,7 +272,7 @@ public class PluginFactory extends ForestryPlugin { String[] dyes = {"dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite"}; - if (ForestryItem.propolis != null) + if (PluginManager.Module.APICULTURE.isEnabled()) for (int i = 0; i < 16; i++) RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Defaults.WILDCARD), LiquidHelper.getLiquid(Defaults.LIQUID_GLASS, Defaults.BUCKET_VOLUME), ForestryBlock.glass.getItemStack(1, 15 - i), new Object[]{"#", "X", '#', dyes[i], @@ -384,23 +382,26 @@ public class PluginFactory extends ForestryPlugin { // ForestryCore.oreHandler.registerCarpenterRecipe(solderingIron); // RAIN SUBSTRATES - RecipeManagers.carpenterManager.addRecipe(5, LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 1000), null, ForestryItem.iodineCharge.getItemStack(), - "Z#Z", - "#Y#", - "X#X", - '#', ForestryItem.pollenCluster, - 'X', Items.gunpowder, - 'Y', ForestryItem.canEmpty, - 'Z', ForestryItem.honeyDrop); - // ForestryCore.oreHandler.registerCarpenterRecipe(iodineCapsule); - RecipeManagers.carpenterManager.addRecipe( - 5, - LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 1000), - null, - ForestryItem.craftingMaterial.getItemStack(1, 4), - new Object[]{"Z#Z", "#Y#", "X#X", '#', ForestryItem.royalJelly, 'X', Items.gunpowder, - 'Y', ForestryItem.canEmpty, 'Z', ForestryItem.honeydew}); - // ForestryCore.oreHandler.registerCarpenterRecipe(dissipationCharge); + if (PluginManager.Module.APICULTURE.isEnabled()) { + RecipeManagers.carpenterManager.addRecipe(5, LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 1000), null, ForestryItem.iodineCharge.getItemStack(), + "Z#Z", + "#Y#", + "X#X", + '#', ForestryItem.pollenCluster, + 'X', Items.gunpowder, + 'Y', ForestryItem.canEmpty, + 'Z', ForestryItem.honeyDrop); + // ForestryCore.oreHandler.registerCarpenterRecipe(iodineCapsule); + RecipeManagers.carpenterManager.addRecipe(5, LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 1000), null, ForestryItem.craftingMaterial.getItemStack(1, 4), + "Z#Z", + "#Y#", + "X#X", + '#', ForestryItem.royalJelly, + 'X', Items.gunpowder, + 'Y', ForestryItem.canEmpty, + 'Z', ForestryItem.honeydew); + // ForestryCore.oreHandler.registerCarpenterRecipe(dissipationCharge); + } // Ender pearl RecipeManagers.carpenterManager.addRecipe(100, null, new ItemStack(Items.ender_pearl, 1), new Object[]{" # ", "###", " # ", '#', @@ -458,13 +459,6 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedMulch.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCookies.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneycombs.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBeeswax.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPollen.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPropolis.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneydew.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRoyalJelly.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCocoaComb.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRedstone.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedLapis.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedReeds.getItemStack()); @@ -473,11 +467,6 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedApples.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherwart.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSimmeringCombs.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStringyCombs.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFrozenCombs.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDrippingCombs.getItemStack()); - RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRefractoryWax.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPhosphor.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedAsh.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCharcoal.getItemStack()); @@ -485,6 +474,21 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCoal.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSeeds.getItemStack()); RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSaplings.getItemStack()); + + if (PluginManager.Module.APICULTURE.isEnabled()) { + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneycombs.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBeeswax.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPollen.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPropolis.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneydew.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRoyalJelly.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCocoaComb.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSimmeringCombs.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStringyCombs.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFrozenCombs.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDrippingCombs.getItemStack()); + RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRefractoryWax.getItemStack()); + } } } diff --git a/src/main/java/forestry/plugins/PluginIC2.java b/src/main/java/forestry/plugins/PluginIC2.java index ef360b314..dc670c89d 100644 --- a/src/main/java/forestry/plugins/PluginIC2.java +++ b/src/main/java/forestry/plugins/PluginIC2.java @@ -175,8 +175,10 @@ public class PluginIC2 extends ForestryPlugin { ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.ELECTRIC_BOOST_II, "forestry.energyBoost2"); // Remove some items from the recycler - Recipes.recyclerBlacklist.add(new RecipeInputItemStack(ForestryItem.beeQueenGE.getItemStack())); - Recipes.recyclerBlacklist.add(new RecipeInputItemStack(ForestryItem.beePrincessGE.getItemStack())); + if (PluginManager.Module.APICULTURE.isEnabled()) { + Recipes.recyclerBlacklist.add(new RecipeInputItemStack(ForestryItem.beeQueenGE.getItemStack())); + Recipes.recyclerBlacklist.add(new RecipeInputItemStack(ForestryItem.beePrincessGE.getItemStack())); + } } @Override diff --git a/src/main/java/forestry/plugins/PluginMail.java b/src/main/java/forestry/plugins/PluginMail.java index caa664dba..8b34611f4 100755 --- a/src/main/java/forestry/plugins/PluginMail.java +++ b/src/main/java/forestry/plugins/PluginMail.java @@ -14,6 +14,7 @@ import net.minecraft.block.material.Material; import net.minecraft.command.ICommand; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.SidedProxy; @@ -179,26 +180,39 @@ public class PluginMail extends ForestryPlugin { @Override protected void registerRecipes() { // Letters - Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD)); + + Item stampGlue; + if (PluginManager.Module.APICULTURE.isEnabled()) { + Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD)); + stampGlue = ForestryItem.honeyDrop.item(); + } else { + Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, Items.slime_ball); + stampGlue = Items.slime_ball; + } if (Config.craftingStampsEnabled) for (int i = 0; i < stampDefinitions.length; i++) { if (Config.collectorStamps.contains(stampDefinitions[i].name)) continue; - Proxies.common.addRecipe(ForestryItem.stamps.getItemStack(9, i), new Object[]{"XXX", "###", "ZZZ", 'X', - stampDefinitions[i].getCraftingIngredient(), '#', Items.paper, 'Z', ForestryItem.honeyDrop}); + Proxies.common.addRecipe(ForestryItem.stamps.getItemStack(9, i), + "XXX", "###", "ZZZ", + 'X', stampDefinitions[i].getCraftingIngredient(), + '#', Items.paper, + 'Z', stampGlue); RecipeManagers.carpenterManager.addRecipe(10, LiquidHelper.getLiquid(Defaults.LIQUID_SEEDOIL, 300), null, ForestryItem.stamps.getItemStack(9, i), - new Object[]{"XXX", "###", 'X', stampDefinitions[i].getCraftingIngredient(), '#', Items.paper}); + "XXX", "###", + 'X', stampDefinitions[i].getCraftingIngredient(), + '#', Items.paper); } // Recycling - Proxies.common.addRecipe(new ItemStack(Items.paper), new Object[]{"###", '#', ForestryItem.letters.getItemStack(1, Defaults.WILDCARD)}); + Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, Defaults.WILDCARD)); // Carpenter - RecipeManagers.carpenterManager.addRecipe(10, LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 250), null, ForestryItem.letters.getItemStack(), new Object[]{"###", "###", '#', ForestryItem.woodPulp}); + RecipeManagers.carpenterManager.addRecipe(10, LiquidHelper.getLiquid(Defaults.LIQUID_WATER, 250), null, ForestryItem.letters.getItemStack(), "###", "###", '#', ForestryItem.woodPulp); - Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), new Object[]{ForestryItem.stamps.getItemStack(1, Defaults.WILDCARD), new ItemStack(Items.book)}); + Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), ForestryItem.stamps.getItemStack(1, Defaults.WILDCARD), new ItemStack(Items.book)); } @Override diff --git a/src/main/java/forestry/plugins/PluginPropolisPipe.java b/src/main/java/forestry/plugins/PluginPropolisPipe.java index 3276b7784..cae301c3a 100755 --- a/src/main/java/forestry/plugins/PluginPropolisPipe.java +++ b/src/main/java/forestry/plugins/PluginPropolisPipe.java @@ -49,6 +49,7 @@ public class PluginPropolisPipe extends ForestryPlugin { public EnumSet getDependancies() { EnumSet deps = super.getDependancies(); deps.add(PluginManager.Module.BUILDCRAFT); + deps.add(PluginManager.Module.APICULTURE); return deps; } diff --git a/src/main/java/forestry/plugins/PluginStorage.java b/src/main/java/forestry/plugins/PluginStorage.java index 130797212..89d991511 100755 --- a/src/main/java/forestry/plugins/PluginStorage.java +++ b/src/main/java/forestry/plugins/PluginStorage.java @@ -391,12 +391,16 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl hunterItems.add(new ItemStack(Items.iron_horse_armor)); // [4] Set valid items in adventurer's backpack + // [5] Set valid items in builder's backpack + if (PluginManager.Module.APICULTURE.isEnabled()) { + builderItems.add(ForestryBlock.candle.getWildcard()); + builderItems.add(ForestryBlock.stump.getWildcard()); + } + builderItems.add(new ItemStack(Blocks.torch)); builderItems.add(new ItemStack(Blocks.redstone_torch)); builderItems.add(new ItemStack(Blocks.redstone_lamp)); - builderItems.add(ForestryBlock.candle.getWildcard()); - builderItems.add(ForestryBlock.stump.getWildcard()); builderItems.add(new ItemStack(Blocks.stonebrick, 1, Defaults.WILDCARD)); builderItems.add(new ItemStack(Blocks.sandstone, 1, 1)); builderItems.add(new ItemStack(Blocks.sandstone, 1, 2)); @@ -444,14 +448,30 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl @Override protected void registerRecipes() { - // Apiarist's Backpack - Proxies.common.addRecipe(ForestryItem.apiaristBackpack.getItemStack(), - new Object[]{"X#X", "VYV", "X#X", '#', Blocks.wool, 'X', Items.string, 'V', - "stickWood", 'Y', ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_APIARISTCHEST_META)}); - // Lepidopterist's Backpack - Proxies.common.addRecipe(ForestryItem.lepidopteristBackpack.getItemStack(), - new Object[]{"X#X", "VYV", "X#X", '#', Blocks.wool, 'X', Items.string, 'V', - "stickWood", 'Y', ForestryBlock.lepidopterology.getItemStack(1, Defaults.DEFINITION_LEPICHEST_META)}); + if (PluginManager.Module.APICULTURE.isEnabled()) { + // Apiarist's Backpack + Proxies.common.addRecipe(ForestryItem.apiaristBackpack.getItemStack(), + "X#X", + "VYV", + "X#X", + '#', Blocks.wool, + 'X', Items.string, + 'V', "stickWood", + 'Y', ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_APIARISTCHEST_META)); + } + + if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { + // Lepidopterist's Backpack + Proxies.common.addRecipe(ForestryItem.lepidopteristBackpack.getItemStack(), + "X#X", + "VYV", + "X#X", + '#', Blocks.wool, + 'X', Items.string, + 'V', "stickWood", + 'Y', ForestryBlock.lepidopterology.getItemStack(1, Defaults.DEFINITION_LEPICHEST_META)); + } + // Miner's Backpack Proxies.common.addRecipe(ForestryItem.minerBackpack.getItemStack(), new Object[]{"X#X", "VYV", "X#X", '#', Blocks.wool, 'X', Items.string, 'V',