示例#1
0
 public boolean isValidInput(MachineRecipeInput input) {
   for (IRecipe recipe : recipes) {
     if (input.item != null && recipe.isValidInput(input.slotNumber, input.item)) {
       return true;
     } else if (input.fluid != null && recipe.isValidInput(input.fluid)) {
       return true;
     }
   }
   return false;
 }
示例#2
0
 public boolean isValidInput(MachineRecipeInput[] inputs) {
   for (IRecipe recipe : recipes) {
     boolean allValid = true;
     for (MachineRecipeInput input : inputs) {
       if (input.item != null) {
         allValid = recipe.isValidInput(input.slotNumber, input.item);
       } else if (input.fluid != null) {
         allValid = recipe.isValidInput(input.fluid);
       }
       if (!allValid) {
         break;
       }
     }
     if (allValid) {
       return true;
     }
   }
   return false;
 }