package net.minecraft.world.item.crafting; import java.util.Optional; import net.minecraft.world.level.Level; public interface SmithingRecipe extends Recipe { @Override default RecipeType getType() { return RecipeType.SMITHING; } @Override RecipeSerializer getSerializer(); default boolean matches(SmithingRecipeInput p_363830_, Level p_369755_) { return Ingredient.testOptionalIngredient(this.templateIngredient(), p_363830_.template()) && this.baseIngredient().test(p_363830_.base()) && Ingredient.testOptionalIngredient(this.additionIngredient(), p_363830_.addition()); } Optional templateIngredient(); Ingredient baseIngredient(); Optional additionIngredient(); @Override default RecipeBookCategory recipeBookCategory() { return RecipeBookCategories.SMITHING; } }