Class ShapedRecipe
java.lang.Object
net.minecraft.world.item.crafting.NormalCraftingRecipe
net.minecraft.world.item.crafting.ShapedRecipe
- All Implemented Interfaces:
CraftingRecipe, Recipe<CraftingInput>
-
Nested Class Summary
Nested classes/interfaces inherited from interface CraftingRecipe
CraftingRecipe.CraftingBookInfoNested classes/interfaces inherited from interface Recipe
Recipe.BookInfo<CategoryType>, Recipe.CommonInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ShapedRecipe> final ShapedRecipePatternprivate final ItemStackTemplatestatic final RecipeSerializer<ShapedRecipe> static final StreamCodec<RegistryFriendlyByteBuf, ShapedRecipe> Fields inherited from class NormalCraftingRecipe
bookInfo, commonInfoFields inherited from interface Recipe
CODEC, CONDITIONAL_CODEC, KEY_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionShapedRecipe(Recipe.CommonInfo commonInfo, CraftingRecipe.CraftingBookInfo bookInfo, ShapedRecipePattern pattern, ItemStackTemplate result) -
Method Summary
Modifier and TypeMethodDescriptionassemble(CraftingInput input) protected PlacementInfodisplay()intintgetWidth()booleanmatches(CraftingInput input, Level level) Methods inherited from class NormalCraftingRecipe
category, group, placementInfo, showNotificationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CraftingRecipe
getRemainingItems, getType, recipeBookCategory
-
Field Details
-
MAP_CODEC
-
STREAM_CODEC
-
SERIALIZER
-
pattern
-
result
-
-
Constructor Details
-
ShapedRecipe
public ShapedRecipe(Recipe.CommonInfo commonInfo, CraftingRecipe.CraftingBookInfo bookInfo, ShapedRecipePattern pattern, ItemStackTemplate result)
-
-
Method Details
-
getSerializer
- Specified by:
getSerializerin interfaceCraftingRecipe- Specified by:
getSerializerin interfaceRecipe<CraftingInput>- Specified by:
getSerializerin classNormalCraftingRecipe
-
getIngredients
-
createPlacementInfo
- Specified by:
createPlacementInfoin classNormalCraftingRecipe
-
matches
-
assemble
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
display
-