SmithingRecipe .java

net.minecraft.world.item.crafting.SmithingRecipe (interface): members: additionIngredient, templateIngredient, baseIngredient, recipeBookCategory, matches.

net.minecraft.world.item.craftinginterface32 linescommonextends Recipe<SmithingRecipeInput>880 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (7)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

SmithingRecipe.java32 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.crafting;
2
3
import java.util.Optional;
4
import net.minecraft.world.level.Level;
5
6
public interface SmithingRecipe extends Recipe<SmithingRecipeInput> {
7
	@Override
8
	default RecipeType<SmithingRecipe> getType() {
9
		return RecipeType.SMITHING;
10
	}
11
12
	@Override
13
	RecipeSerializer<? extends SmithingRecipe> getSerializer();
14
15
	default boolean matches(final SmithingRecipeInput input, final Level level) {
16
		return Ingredient.testOptionalIngredient(this.templateIngredient(), input.template())
17
			&& this.baseIngredient().test(input.base())
18
			&& Ingredient.testOptionalIngredient(this.additionIngredient(), input.addition());
19
	}
20
21
	Optional<Ingredient> templateIngredient();
22
23
	Ingredient baseIngredient();
24
25
	Optional<Ingredient> additionIngredient();
26
27
	@Override
28
	default RecipeBookCategory recipeBookCategory() {
29
		return RecipeBookCategories.SMITHING;
30
	}
31
}
32

Decompiled Minecraft 26.3 source of SmithingRecipe (net/minecraft/world/item/crafting/SmithingRecipe.java) with Mojang official mappings, stored verbatim on the site.