Package net.minecraft.recipe
Class SmithingRecipe
java.lang.Object
net.minecraft.recipe.SmithingRecipe
public class SmithingRecipe extends Object implements Recipe<Inventory>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSmithingRecipe.Serializer -
Field Summary
Fields Modifier and Type Field Description private Ingredientadditionprivate Ingredientbaseprivate Identifieridprivate ItemStackresult -
Constructor Summary
Constructors Constructor Description SmithingRecipe(Identifier id, Ingredient base, Ingredient addition, ItemStack result) -
Method Summary
Modifier and Type Method Description ItemStackcraft(Inventory inventory)Crafts this recipe.ItemStackcreateIcon()Creates the stack that is displayed on the recipe book tab containing this recipe, and on a toast when a recipe of this type is unlocked.booleanfits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area.IdentifiergetId()ItemStackgetOutput()RecipeSerializer<?>getSerializer()RecipeType<?>getType()booleanmatches(Inventory inventory, World world)Determines whether this recipe matches the contents currently placed inside the available crafting grid.booleanmethod_30029(ItemStack itemStack)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.recipe.Recipe
getGroup, getIngredients, getRemainder, isIgnoredInRecipeBook
-
Field Details
-
base
-
addition
-
result
-
id
-
-
Constructor Details
-
SmithingRecipe
-
-
Method Details
-
matches
Determines whether this recipe matches the contents currently placed inside the available crafting grid. -
craft
Crafts this recipe.This method may perform side effects on the
inventoryargument.This method should return a new item stack on each call.
-
fits
@Environment(CLIENT) public boolean fits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area. -
getOutput
-
method_30029
-
createIcon
Creates the stack that is displayed on the recipe book tab containing this recipe, and on a toast when a recipe of this type is unlocked. Used in conjunction withRecipe.getGroup().- Specified by:
createIconin interfaceRecipe<Inventory>
-
getId
-
getSerializer
- Specified by:
getSerializerin interfaceRecipe<Inventory>
-
getType
-