Class SingleItemRecipe
java.lang.Object
net.minecraft.world.item.crafting.SingleItemRecipe
- All Implemented Interfaces:
Recipe<SingleRecipeInput>
- Direct Known Subclasses:
StonecutterRecipe
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSingleItemRecipe.Factory<T extends SingleItemRecipe>static classSingleItemRecipe.Serializer<T extends SingleItemRecipe> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Ingredientprotected final ItemStackprivate final RecipeSerializer<?> private final RecipeType<?> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSingleItemRecipe(RecipeType<?> pType, RecipeSerializer<?> pSerializer, String pGroup, Ingredient pIngredient, ItemStack pResult) -
Method Summary
Modifier and TypeMethodDescriptionassemble(SingleRecipeInput pInput, HolderLookup.Provider pRegistries) booleancanCraftInDimensions(int pWidth, int pHeight) Used to determine if this recipe can fit in a grid of the given width/heightgetGroup()getResultItem(HolderLookup.Provider pRegistries) RecipeType<?> getType()Methods 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.Recipe
getRemainingItems, getToastSymbol, isIncomplete, isSpecial, matches, showNotification
-
Field Details
-
ingredient
-
result
-
type
-
serializer
-
group
-
-
Constructor Details
-
SingleItemRecipe
public SingleItemRecipe(RecipeType<?> pType, RecipeSerializer<?> pSerializer, String pGroup, Ingredient pIngredient, ItemStack pResult)
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceRecipe<SingleRecipeInput>
-
getSerializer
- Specified by:
getSerializerin interfaceRecipe<SingleRecipeInput>
-
getGroup
- Specified by:
getGroupin interfaceRecipe<SingleRecipeInput>
-
getResultItem
- Specified by:
getResultItemin interfaceRecipe<SingleRecipeInput>
-
getIngredients
- Specified by:
getIngredientsin interfaceRecipe<SingleRecipeInput>
-
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:
canCraftInDimensionsin interfaceRecipe<SingleRecipeInput>
-
assemble
- Specified by:
assemblein interfaceRecipe<SingleRecipeInput>
-