@SuppressWarnings({"rawtypes","unchecked"}) public boolean matches(InventoryCrafting p_77569_1_,World p_77569_2_){
  ArrayList arraylist=new ArrayList(this.recipeItems);
  for (int i=0; i < 5; ++i) {
    for (int j=0; j < 5; ++j) {
      ItemStack itemstack=p_77569_1_.getStackInRowAndColumn(j,i);
      if (itemstack != null) {
        boolean flag=false;
        Iterator iterator=arraylist.iterator();
        while (iterator.hasNext()) {
          ItemStack itemstack1=(ItemStack)iterator.next();
          if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getItemDamage() == 32767 || itemstack.getItemDamage() == itemstack1.getItemDamage())) {
            flag=true;
            arraylist.remove(itemstack1);
            break;
          }
        }
        if (!flag) {
          return false;
        }
      }
    }
  }
  return arraylist.isEmpty();
}

@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public boolean matches ( InventoryCrafting p_77569_1_ , World p_77569_2_ ) { ArrayList arraylist = new ArrayList ( this . recipeItems ) ; for ( int i = 0 ; i < 5 ; ++ i ) { for ( int j = 0 ; j < 5 ; ++ j ) { ItemStack itemstack = p_77569_1_ . getStackInRowAndColumn ( j , i ) ; if ( itemstack != null ) { boolean flag = false ; Iterator iterator = arraylist . iterator ( ) ; while ( iterator . hasNext ( ) ) { ItemStack itemstack1 = ( ItemStack ) iterator . next ( ) ; if ( itemstack . getItem ( ) == itemstack1 . getItem ( ) && ( itemstack1 . getItemDamage ( ) == 32767 || itemstack . getItemDamage ( ) == itemstack1 . getItemDamage ( ) ) ) { flag = true ; arraylist . remove ( itemstack1 ) ; break ; } } if ( ! flag ) { return false ; } } } } return arraylist . isEmpty ( ) ; }
used to check if a recipe matches current crafting inventory
