public virtual bool Func_21134_a(net.minecraft.src.InventoryCrafting inventorycrafting
                                         )
        {
            System.Collections.ArrayList arraylist = new System.Collections.ArrayList(field_21137_b
                                                                                      );
            int i = 0;

            do
            {
                if (i >= 3)
                {
                    break;
                }
                for (int j = 0; j < 3; j++)
                {
                    net.minecraft.src.ItemStack itemstack = inventorycrafting.Func_21084_a(j, i);
                    if (itemstack == null)
                    {
                        continue;
                    }
                    bool flag = false;
                    System.Collections.IEnumerator iterator = arraylist.GetEnumerator();
                    do
                    {
                        if (!iterator.MoveNext())
                        {
                            break;
                        }
                        net.minecraft.src.ItemStack itemstack1 = (net.minecraft.src.ItemStack)iterator.Current;
                        if (itemstack.itemID != itemstack1.itemID || itemstack1.GetItemDamage() != -1 &&
                            itemstack.GetItemDamage() != itemstack1.GetItemDamage())
                        {
                            continue;
                        }
                        flag = true;
                        arraylist.Remove(itemstack1);
                        break;
                    }while (true);
                    if (!flag)
                    {
                        return(false);
                    }
                }
                i++;
            }while (true);
            return(arraylist.Count < 1);
        }
Exemple #2
0
 private bool Func_21139_a(net.minecraft.src.InventoryCrafting inventorycrafting,
                           int i, int j, bool flag)
 {
     for (int k = 0; k < 3; k++)
     {
         for (int l = 0; l < 3; l++)
         {
             int i1 = k - i;
             int j1 = l - j;
             net.minecraft.src.ItemStack itemstack = null;
             if (i1 >= 0 && j1 >= 0 && i1 < field_21140_b && j1 < field_21144_c)
             {
                 if (flag)
                 {
                     itemstack = field_21143_d[(field_21140_b - i1 - 1) + j1 * field_21140_b];
                 }
                 else
                 {
                     itemstack = field_21143_d[i1 + j1 * field_21140_b];
                 }
             }
             net.minecraft.src.ItemStack itemstack1 = inventorycrafting.Func_21084_a(k, l);
             if (itemstack1 == null && itemstack == null)
             {
                 continue;
             }
             if (itemstack1 == null && itemstack != null || itemstack1 != null && itemstack ==
                 null)
             {
                 return(false);
             }
             if (itemstack.itemID != itemstack1.itemID)
             {
                 return(false);
             }
             if (itemstack.GetItemDamage() != -1 && itemstack.GetItemDamage() != itemstack1.GetItemDamage
                     ())
             {
                 return(false);
             }
         }
     }
     return(true);
 }