Class ShapelessRecipe
java.lang.Object
net.minecraft.world.item.crafting.ShapelessRecipe
- All Implemented Interfaces:
CraftingRecipe
,Recipe<CraftingInput>
- Direct Known Subclasses:
IngredientTests.CompressedShapelessRecipe
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CraftingBookCategory
(package private) final String
(package private) final NonNullList
<Ingredient> private final boolean
(package private) final ItemStack
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionShapelessRecipe
(String pGroup, CraftingBookCategory pCategory, ItemStack pResult, NonNullList<Ingredient> pIngredients) -
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()
getResultItem
(HolderLookup.Provider pRegistries) boolean
matches
(CraftingInput pInput, Level pLevel) 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, isIncomplete, isSpecial, showNotification
-
Field Details
-
group
-
category
-
result
-
ingredients
-
isSimple
private final boolean isSimple
-
-
Constructor Details
-
ShapelessRecipe
public ShapelessRecipe(String pGroup, CraftingBookCategory pCategory, ItemStack pResult, NonNullList<Ingredient> pIngredients)
-
-
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>
-
matches
- Specified by:
matches
in interfaceRecipe<CraftingInput>
-
assemble
- Specified by:
assemble
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>
-