From add35720858b12389c64a74ca2da4b3691d33ea1 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Mon, 18 Aug 2014 05:38:48 -0700 Subject: [PATCH] Fix missing support for ForestryBlock --- src/main/java/forestry/core/gui/slots/SlotCustom.java | 3 +++ src/main/java/forestry/core/utils/ShapedRecipeCustom.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/forestry/core/gui/slots/SlotCustom.java b/src/main/java/forestry/core/gui/slots/SlotCustom.java index 6bb5bb99f..d0881973a 100755 --- a/src/main/java/forestry/core/gui/slots/SlotCustom.java +++ b/src/main/java/forestry/core/gui/slots/SlotCustom.java @@ -24,6 +24,7 @@ import cpw.mods.fml.relauncher.SideOnly; import forestry.api.genetics.ISpeciesRoot; import forestry.core.config.Defaults; +import forestry.core.config.ForestryBlock; import forestry.core.config.ForestryItem; import forestry.core.interfaces.ICrafter; import forestry.core.render.TextureManager; @@ -126,6 +127,8 @@ public class SlotCustom extends SlotForestry { if (itemstack.getItem() == (Item) filter) return true; } else if (filter instanceof ForestryItem) { if (((ForestryItem) filter).isItemEqual(itemstack)) return true; + } else if (filter instanceof ForestryBlock) { + if (((ForestryBlock) filter).isItemEqual(itemstack)) return true; } else if (filter instanceof ISpeciesRoot) { if (((ISpeciesRoot) filter).isMember(itemstack)) return true; } else { diff --git a/src/main/java/forestry/core/utils/ShapedRecipeCustom.java b/src/main/java/forestry/core/utils/ShapedRecipeCustom.java index 66adf1ce1..bb1460a45 100755 --- a/src/main/java/forestry/core/utils/ShapedRecipeCustom.java +++ b/src/main/java/forestry/core/utils/ShapedRecipeCustom.java @@ -24,6 +24,7 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; import forestry.core.config.Defaults; +import forestry.core.config.ForestryBlock; import forestry.core.config.ForestryItem; import forestry.core.interfaces.IDescriptiveRecipe; @@ -222,6 +223,8 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe { hashmap.put(character, new ItemStack((Item) materials[index + 1])); else if (materials[index + 1] instanceof ForestryItem) hashmap.put(character, ((ForestryItem) materials[index + 1]).getItemStack()); + else if (materials[index + 1] instanceof ForestryBlock) + hashmap.put(character, ((ForestryBlock) materials[index + 1]).getItemStack()); else if (materials[index + 1] instanceof Block) hashmap.put(character, new ItemStack((Block) materials[index + 1], 1, Defaults.WILDCARD)); else if (materials[index + 1] instanceof ItemStack)