Class ShapedRecipe
java.lang.Object
net.minecraft.world.item.crafting.ShapedRecipe
- All Implemented Interfaces:
CraftingRecipe,Recipe<CraftingInput>
- Direct Known Subclasses:
MapExtendingRecipe
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CraftingBookCategory(package private) final Stringfinal ShapedRecipePattern(package private) final ItemStack(package private) final booleanFields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result) ShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result, boolean showNotification) -
Method Summary
Modifier and TypeMethodDescriptionassemble(CraftingInput input, HolderLookup.Provider registries) booleancanCraftInDimensions(int width, int height) Used to determine if this recipe can fit in a grid of the given width/heightcategory()getGroup()intgetResultItem(HolderLookup.Provider registries) intgetWidth()booleanbooleanmatches(CraftingInput input, Level level) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.CraftingRecipe
getTypeMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getRemainingItems, getToastSymbol, isSpecial
-
Field Details
-
pattern
-
result
-
group
-
category
-
showNotification
final boolean showNotification
-
-
Constructor Details
-
ShapedRecipe
public ShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result, boolean showNotification) -
ShapedRecipe
public ShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result)
-
-
Method Details
-
getSerializer
- Specified by:
getSerializerin interfaceRecipe<CraftingInput>
-
getGroup
- Specified by:
getGroupin interfaceRecipe<CraftingInput>
-
category
- Specified by:
categoryin interfaceCraftingRecipe
-
getResultItem
- Specified by:
getResultItemin interfaceRecipe<CraftingInput>
-
getIngredients
- Specified by:
getIngredientsin interfaceRecipe<CraftingInput>
-
showNotification
public boolean showNotification()- Specified by:
showNotificationin interfaceRecipe<CraftingInput>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) Used to determine if this recipe can fit in a grid of the given width/height- Specified by:
canCraftInDimensionsin interfaceRecipe<CraftingInput>
-
matches
- Specified by:
matchesin interfaceRecipe<CraftingInput>
-
assemble
- Specified by:
assemblein interfaceRecipe<CraftingInput>
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
isIncomplete
public boolean isIncomplete()- Specified by:
isIncompletein interfaceRecipe<CraftingInput>
-