From 507b03043eee051bcaa91a6669d26e0c7b9e2f36 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 21 Feb 2016 19:34:34 -0600 Subject: [PATCH] Add module checks to RotaryCraft plugin --- .../forestry/plugins/compat/PluginRotaryCraft.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginRotaryCraft.java b/src/main/java/forestry/plugins/compat/PluginRotaryCraft.java index f5828253a..c048e2c36 100644 --- a/src/main/java/forestry/plugins/compat/PluginRotaryCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginRotaryCraft.java @@ -25,6 +25,7 @@ import forestry.farming.logic.FarmableBasicFruit; import forestry.farming.logic.FarmableGenericCrop; import forestry.plugins.ForestryPlugin; import forestry.plugins.Plugin; +import forestry.plugins.PluginManager; @Plugin(pluginID = "RotaryCraft", name = "RotaryCraft", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.rotarycraft.description") public class PluginRotaryCraft extends ForestryPlugin { @@ -50,9 +51,13 @@ public class PluginRotaryCraft extends ForestryPlugin { int seedAmount = (ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed") / 16); seedAmount = Math.max(seedAmount, 1); // Produce at least 1 mb. if (canolaSeed != null && canolaCrop != null) { - RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{canolaSeed}, Fluids.SEEDOIL.getFluid(seedAmount)); - Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(canolaSeed, canolaCrop, 9)); - Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(canolaCrop, 9)); + if(PluginManager.Module.FACTORY.isEnabled()) { + RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{canolaSeed}, Fluids.SEEDOIL.getFluid(seedAmount)); + } + if(PluginManager.Module.FARMING.isEnabled()) { + Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(canolaSeed, canolaCrop, 9)); + Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(canolaCrop, 9)); + } } }