package net.acomputerdog.BlazeLoader.api.recipe;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.ShapelessRecipes;
import net.minecraft.world.World;

public class BShapelessRecipe extends ShapelessRecipes {
	private final List recipeItems;
	
	private int craftingWidth = 3;
    private int craftingHeight = 3;
	
	public BShapelessRecipe(ItemStack par1ItemStack, List par2List) {
        super(par1ItemStack, par2List);
        recipeItems = par2List;
    }
	
	public void setCraftingSize(int width, int height) {
    	craftingWidth = width;
    	craftingHeight = height;
    }
	
	public boolean matches(InventoryCrafting par1InventoryCrafting, World par2World) {
        ArrayList var3 = new ArrayList(recipeItems);

        for (int var4 = 0; var4 < craftingWidth; ++var4) {
            for (int var5 = 0; var5 < craftingHeight; ++var5) {
                ItemStack var6 = par1InventoryCrafting.getStackInRowAndColumn(var5, var4);

                if (var6 != null) {
                    boolean var7 = false;
                    Iterator var8 = var3.iterator();

                    while (var8.hasNext()) {
                        ItemStack var9 = (ItemStack)var8.next();

                        if (var6 == var9 && (var9.getItemDamage() == 32767 || var6.getItemDamage() == var9.getItemDamage())) {
                            var7 = true;
                            var3.remove(var9);
                            break;
                        }
                    }

                    if (!var7) {
                        return false;
                    }
                }
            }
        }

        return var3.isEmpty();
    }
}

@@ -5,47 +5,29 @@
 age 
-net.acomputerdog.BlazeLoader.api.recipe
+manilla.util.crafting
 ;%0A%0Ai
@@ -480,76 +480,56 @@
 ack 
-par1ItemStack, List par2List) %7B%0A        super(par1ItemStack, par2Lis
+output, List input) %7B%0A        super(output, inpu
 t);%0A
@@ -554,15 +554,12 @@
 s = 
-par2Lis
+inpu
 t;%0A 
@@ -727,20 +727,24 @@
 rafting 
-par1
+crafting
 Inventor
@@ -748,33 +748,17 @@
 tory
-Crafting, World par2World
+, World w
 ) %7B%0A
@@ -775,20 +775,26 @@
 rayList 
-var3
+workingSet
  = new A
@@ -838,22 +838,20 @@
 int 
-var4
+col
  = 0; 
-var4
+col
  %3C c
@@ -866,20 +866,19 @@
 idth; ++
-var4
+col
 ) %7B%0A    
@@ -898,22 +898,20 @@
 int 
-var5
+row
  = 0; 
-var5
+row
  %3C c
@@ -927,20 +927,19 @@
 ight; ++
-var5
+row
 ) %7B%0A    
@@ -964,19 +964,24 @@
 ack 
-var6 = par1
+stack = crafting
 Inve
@@ -985,24 +985,16 @@
 nventory
-Crafting
 .getStac
@@ -1013,18 +1013,16 @@
 umn(
-var5, var4
+row, col
 );%0A%0A
@@ -1041,20 +1041,21 @@
     if (
-var6
+stack
  != null
@@ -1086,20 +1086,22 @@
 boolean 
-var7
+result
  = false
@@ -1135,19 +1135,25 @@
 tor 
-var8 = var3
+iter = workingSet
 .ite
@@ -1189,20 +1189,20 @@
  while (
-var8
+iter
 .hasNext
@@ -1241,20 +1241,20 @@
 emStack 
-var9
+next
  = (Item
@@ -1263,12 +1263,12 @@
 ack)
-var8
+iter
 .nex
@@ -1305,29 +1305,30 @@
 if (
-var6 == var9
+stack == next
  && (
-var9
+next
 .get
@@ -1356,12 +1356,13 @@
  %7C%7C 
-var6
+stack
 .get
@@ -1377,20 +1377,20 @@
 ge() == 
-var9
+next
 .getItem
@@ -1430,20 +1430,22 @@
         
-var7
+result
  = true;
@@ -1477,20 +1477,26 @@
     
-var3
+workingSet
 .remove(
 var9
@@ -1495,12 +1495,12 @@
 ove(
-var9
+next
 );%0A 
@@ -1611,12 +1611,14 @@
 f (!
-var7
+result
 ) %7B%0A
@@ -1739,12 +1739,18 @@
 urn 
-var3
+workingSet
 .isE

Update BShapelessRecipe.java