package thaumcraft.api.crafting; import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.AspectList; public class InfusionRecipe { public AspectList aspects; public String research; public ItemStack[] components; public ItemStack recipeInput; public Object recipeOutput; public int instability; public InfusionRecipe(String research, Object output, int inst, AspectList aspects2, ItemStack input, ItemStack[] recipe) { this.research = research; this.recipeOutput = output; this.recipeInput = input; this.aspects = aspects2; this.components = recipe; this.instability = inst; } /** * Used to check if a recipe matches current crafting inventory * @param player */ public boolean matches(ArrayList input, ItemStack central, World world, EntityPlayer player) { if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, research)) { return false; } ItemStack i2 = central.copy(); if (recipeInput.getItemDamage()==OreDictionary.WILDCARD_VALUE) { i2.setItemDamage(OreDictionary.WILDCARD_VALUE); } if (!areItemStacksEqual(i2, recipeInput, true)) return false; ArrayList ii = new ArrayList(); for (ItemStack is:input) { ii.add(is.copy()); } for (ItemStack comp:components) { boolean b=false; for (int a=0;a stack0.getMaxStackSize() ? false : t1)); } public Object getRecipeOutput() { return recipeOutput; } public AspectList getAspects() { return aspects; } public String getResearch() { return research; } }