question: public boolean matches ( InventoryCrafting matrix , World world ) { ArrayList arraylist = new ArrayList ( this . recipeItems ) ; for ( int i = 0 ; i < 9 ; ++ i ) { for ( int j = 0 ; j < 9 ; ++ j ) { ItemStack itemstack = matrix . 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 ( ) ; }
target:  Used to check if a recipe matches current crafting inventory