Example #1
0
 @Override
 public boolean matches(Object o) {
   IPlateRecipe r = (IPlateRecipe) o;
   return (r.useOvenRecipe() == isOvenRecipe)
       && (areEqualNull(r.getOutput(), output))
       && (areEqualNull(r.getInput(), input));
 }
Example #2
0
    // Loops through the registry, to find the item that matches, saves that recipe then removes it
    @Override
    public void apply() {
      for (IPlateRecipe r : RecipeRegisterManager.plateRecipe.getRecipeList()) {
        if (r.getOutput() != null && areEqual(r.getOutput(), stack)) {
          recipe = r;
          break;
        }
      }

      if (recipe == null) {
        MineTweakerAPI.getLogger()
            .logWarning("No Cooking Iron Plate recipe for " + getRecipeInfo() + " found.");
      } else {
        list.remove(recipe);
      }
    }
Example #3
0
 private void logPlateRecipes() {
   for (IPlateRecipe recipe : RecipeRegisterManager.plateRecipe.getRecipeList()) {
     String o =
         "mods.amt.Plate.addRecipe("
             + getItemDeclaration(recipe.getOutput())
             + ", "
             + getItemDeclaration(recipe.getInput())
             + ", "
             + recipe.cookingTime()
             + ", ";
     if (recipe.useOvenRecipe()) {
       o += "true";
     } else {
       o += "false";
     }
     MineTweakerAPI.logCommand(o + ");");
   }
 }