question: public boolean matches ( InventoryCrafting inv , World worldIn ) { ItemStack itemstack = null ; List < ItemStack > list = Lists . < ItemStack > newArrayList ( ) ; for ( int i = 0 ; i < inv . getSizeInventory ( ) ; ++ i ) { ItemStack itemstack1 = inv . getStackInSlot ( i ) ; if ( itemstack1 != null ) { if ( itemstack1 . getItem ( ) instanceof ItemArmor ) { ItemArmor itemarmor = ( ItemArmor ) itemstack1 . getItem ( ) ; if ( itemarmor . getArmorMaterial ( ) != CyberwareContent . trenchMat || itemstack != null ) { return false ; } itemstack = itemstack1 ; } else { if ( itemstack1 . getItem ( ) != Items . DYE ) { return false ; } list . add ( itemstack1 ) ; } } } return itemstack != null && ! list . isEmpty ( ) ; }
target:  Used to check if a recipe matches current crafting inventory