Class AbstractCookingRecipe
java.lang.Object
net.minecraft.world.item.crafting.AbstractCookingRecipe
- All Implemented Interfaces:
Recipe<SingleRecipeInput>
- Direct Known Subclasses:
BlastingRecipe,CampfireCookingRecipe,SmeltingRecipe,SmokingRecipe
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CookingBookCategoryprotected final intprotected final floatprotected final Stringprotected final Ingredientprotected final ItemStackprotected final RecipeType<?> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCookingRecipe(RecipeType<?> pType, String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) -
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/heightcategory()intfloatgetGroup()getResultItem(HolderLookup.Provider pRegistries) RecipeType<?> getType()booleanmatches(SingleRecipeInput pInput, Level pLevel) 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, getSerializer, getToastSymbol, isIncomplete, isSpecial, showNotification
-
Field Details
-
type
-
category
-
group
-
ingredient
-
result
-
experience
protected final float experience -
cookingTime
protected final int cookingTime
-
-
Constructor Details
-
AbstractCookingRecipe
public AbstractCookingRecipe(RecipeType<?> pType, String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime)
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceRecipe<SingleRecipeInput>
-
assemble
- Specified by:
assemblein 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>
-
getIngredients
- Specified by:
getIngredientsin interfaceRecipe<SingleRecipeInput>
-
getExperience
public float getExperience() -
getResultItem
- Specified by:
getResultItemin interfaceRecipe<SingleRecipeInput>
-
getGroup
- Specified by:
getGroupin interfaceRecipe<SingleRecipeInput>
-
getCookingTime
public int getCookingTime() -
getType
- Specified by:
getTypein interfaceRecipe<SingleRecipeInput>
-
category
-