From baa70ece6d218093d6b1d4f797a48f1dc456e460 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Mon, 12 Jan 2015 23:58:42 -0600 Subject: [PATCH] Add Fermenter support for Barley, Natura Saplings --- src/main/java/forestry/plugins/PluginNatura.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/forestry/plugins/PluginNatura.java b/src/main/java/forestry/plugins/PluginNatura.java index 8595727941..70d47da8d8 100755 --- a/src/main/java/forestry/plugins/PluginNatura.java +++ b/src/main/java/forestry/plugins/PluginNatura.java @@ -18,6 +18,7 @@ import forestry.core.config.Defaults; import forestry.core.fluids.Fluids; import forestry.core.proxy.Proxies; +import forestry.core.utils.RecipeUtil; import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.item.Item; @@ -64,6 +65,10 @@ public void doInit() { for (String key : saplingItemKeys) { Item saplingItem = GameRegistry.findItem(NATURA, key); + + ItemStack saplingWild = new ItemStack(saplingItem, 1, Defaults.WILDCARD); + RecipeUtil.injectLeveledRecipe(saplingWild, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS); + String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem); FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName)); } @@ -115,6 +120,10 @@ protected void registerRecipes() { amount = (amount > 1) ? amount : 1; // Produce at least 1 mb of juice. for (ItemStack berry : berries) RecipeManagers.squeezerManager.addRecipe(3, new ItemStack[]{berry}, Fluids.JUICE.getFluid(amount)); + + ItemStack itemBarley = GameRegistry.findItemStack(NATURA, "barleyFood", 1); + if (itemBarley != null) + RecipeUtil.injectLeveledRecipe(itemBarley, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS); } }