public class TestRecipe implements Recipe { //[...] @Override public boolean matches(CraftingInventory inv, World world) { if(inv.getInvSize(0 < 2) return false; return inputA.test(inventory.getInvStack(0)) && inputB.test(inventory.getInvStack(1)); } }