Skip to content

Commit

Permalink
Add module checks to RotaryCraft plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirek-K committed Feb 22, 2016
1 parent c1e00ff commit 507b030
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/forestry/plugins/compat/PluginRotaryCraft.java
Expand Up @@ -25,6 +25,7 @@
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 {
Expand All @@ -50,9 +51,13 @@ protected void registerRecipes() {
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));
}
}
}

Expand Down

0 comments on commit 507b030

Please sign in to comment.