mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Fix missing support for ForestryBlock
This commit is contained in:
1 parent
83789ae8f7
commit
add3572085
2 files changed
+6
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user