Class ShapelessRecipe
java.lang.Object
net.minecraft.world.item.crafting.NormalCraftingRecipe
net.minecraft.world.item.crafting.ShapelessRecipe
- 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 TypeFieldDescriptionprivate final List<Ingredient> private final booleanstatic final com.mojang.serialization.MapCodec<ShapelessRecipe> private final ItemStackTemplatestatic final RecipeSerializer<ShapelessRecipe> static final StreamCodec<RegistryFriendlyByteBuf, ShapelessRecipe> Fields inherited from class NormalCraftingRecipe
bookInfo, commonInfoFields inherited from interface Recipe
CODEC, CONDITIONAL_CODEC, KEY_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionShapelessRecipe(Recipe.CommonInfo commonInfo, CraftingRecipe.CraftingBookInfo bookInfo, ItemStackTemplate result, List<Ingredient> ingredients) -
Method Summary
Modifier and TypeMethodDescriptionassemble(CraftingInput input) protected PlacementInfodisplay()booleanmatches(CraftingInput input, Level level) @Nullable ItemStackTemplateresult()Returns the result of this shapeless recipe or null if it is not static and needs ot be obtained by assembling it.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
-
result
-
ingredients
-
isSimple
private final boolean isSimple
-
-
Constructor Details
-
ShapelessRecipe
public ShapelessRecipe(Recipe.CommonInfo commonInfo, CraftingRecipe.CraftingBookInfo bookInfo, ItemStackTemplate result, List<Ingredient> ingredients)
-
-
Method Details
-
getSerializer
- Specified by:
getSerializerin interfaceCraftingRecipe- Specified by:
getSerializerin interfaceRecipe<CraftingInput>- Specified by:
getSerializerin classNormalCraftingRecipe
-
createPlacementInfo
- Specified by:
createPlacementInfoin classNormalCraftingRecipe
-
matches
-
result
Returns the result of this shapeless recipe or null if it is not static and needs ot be obtained by assembling it.- Returns:
- the result of this shapeless recipe or null if it is not static and needs ot be obtained by assembling it
-
assemble
-
display
-