package universalcoins.util;

import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
import universalcoins.UniversalCoins;

public class RecipeEnderCard implements IRecipe {

	private ItemStack newStack = new ItemStack(UniversalCoins.proxy.itemEnderCard);
	private Item[] recipeItems = { null, Items.ender_pearl, null, Items.ender_pearl, UniversalCoins.proxy.itemUCCard,
			Items.ender_pearl, null, Items.ender_pearl, null };

	@Override
	public boolean matches(InventoryCrafting var1, World var2) {
		this.newStack = null;
		for (int j = 0; j < var1.getSizeInventory(); j++) {
			if (var1.getStackInSlot(j) == null && recipeItems[j] != null) {
				return false;
			}
			if (var1.getStackInSlot(j) != null && var1.getStackInSlot(j).getItem() != recipeItems[j]) {
				return false;
			}
		}
		this.newStack.setTagCompound(var1.getStackInSlot(4).getTagCompound());
		return true;
	}

	@Override
	public ItemStack getCraftingResult(InventoryCrafting var1) {
		return newStack;
	}

	@Override
	public int getRecipeSize() {
		return 9;
	}

	@Override
	public ItemStack getRecipeOutput() {
		return newStack;
	}

}

@@ -374,60 +374,8 @@
 tack
- = new ItemStack(UniversalCoins.proxy.itemEnderCard)
 ;%0A%09p
@@ -906,16 +906,85 @@
 %09%09%7D%0A%09%09%7D%0A
+%09%09this.newStack = new ItemStack(UniversalCoins.proxy.itemEnderCard);%0A
 %09%09this.n

revert changes to endercard recipe