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 String
final ShapedRecipePattern
(package private) final ItemStack
(package private) final boolean
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionShapedRecipe
(String pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult) ShapedRecipe
(String pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult, boolean pShowNotification) -
Method Summary
Modifier and TypeMethodDescriptionassemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) boolean
canCraftInDimensions
(int pWidth, int pHeight) Used to determine if this recipe can fit in a grid of the given width/heightcategory()
getGroup()
int
getResultItem
(HolderLookup.Provider pRegistries) int
getWidth()
boolean
boolean
matches
(CraftingInput pInput, Level pLevel) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.item.crafting.CraftingRecipe
getType
Methods 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 pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult, boolean pShowNotification) -
ShapedRecipe
public ShapedRecipe(String pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult)
-
-
Method Details
-
getSerializer
- Specified by:
getSerializer
in interfaceRecipe<CraftingInput>
-
getGroup
- Specified by:
getGroup
in interfaceRecipe<CraftingInput>
-
category
- Specified by:
category
in interfaceCraftingRecipe
-
getResultItem
- Specified by:
getResultItem
in interfaceRecipe<CraftingInput>
-
getIngredients
- Specified by:
getIngredients
in interfaceRecipe<CraftingInput>
-
showNotification
public boolean showNotification()- Specified by:
showNotification
in interfaceRecipe<CraftingInput>
-
canCraftInDimensions
public boolean canCraftInDimensions(int pWidth, int pHeight) Used to determine if this recipe can fit in a grid of the given width/height- Specified by:
canCraftInDimensions
in interfaceRecipe<CraftingInput>
-
matches
- Specified by:
matches
in interfaceRecipe<CraftingInput>
-
assemble
- Specified by:
assemble
in interfaceRecipe<CraftingInput>
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
isIncomplete
public boolean isIncomplete()- Specified by:
isIncomplete
in interfaceRecipe<CraftingInput>
-