Package net.minecraft.recipe
Class CuttingRecipe
java.lang.Object
net.minecraft.recipe.CuttingRecipe
- Direct Known Subclasses:
StonecuttingRecipe
public abstract class CuttingRecipe extends Object implements Recipe<Inventory>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCuttingRecipe.Serializer<T extends CuttingRecipe> -
Field Summary
Fields Modifier and Type Field Description protected Stringgroupprotected Identifieridprotected Ingredientinputprotected ItemStackoutputprivate RecipeSerializer<?>serializerprivate RecipeType<?>type -
Constructor Summary
Constructors Constructor Description CuttingRecipe(RecipeType<?> type, RecipeSerializer<?> serializer, Identifier id, String group, Ingredient input, ItemStack output) -
Method Summary
Modifier and Type Method Description ItemStackcraft(Inventory inventory)Crafts this recipe.booleanfits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area.StringgetGroup()Optional group this recipe belongs in.IdentifiergetId()DefaultedList<Ingredient>getIngredients()The ingredients accepted as inputs for this recipe.ItemStackgetOutput()RecipeSerializer<?>getSerializer()RecipeType<?>getType()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
createIcon, getRemainder, isIgnoredInRecipeBook, matches
-
Field Details
-
input
-
output
-
type
-
serializer
-
id
-
group
-
-
Constructor Details
-
CuttingRecipe
public CuttingRecipe(RecipeType<?> type, RecipeSerializer<?> serializer, Identifier id, String group, Ingredient input, ItemStack output)
-
-
Method Details
-
getType
-
getSerializer
- Specified by:
getSerializerin interfaceRecipe<Inventory>
-
getId
-
getGroup
Optional group this recipe belongs in. Used to group recipes into different categories by the recipe book. -
getOutput
-
getIngredients
The ingredients accepted as inputs for this recipe. Used by the recipe book when displaying a ghost form of this recipe on the crafting grid as well as for previewing the possible inputs in the book itself.- Specified by:
getIngredientsin interfaceRecipe<Inventory>
-
fits
@Environment(CLIENT) public boolean fits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area. -
craft
Crafts this recipe.This method may perform side effects on the
inventoryargument.This method should return a new item stack on each call.
-