@Override public boolean matches(Object o) { IPlateRecipe r = (IPlateRecipe) o; return (r.useOvenRecipe() == isOvenRecipe) && (areEqualNull(r.getOutput(), output)) && (areEqualNull(r.getInput(), input)); }
// 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); } }
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 + ");"); } }