Class AbstractCookingRecipe
java.lang.Object
net.minecraft.world.item.crafting.SingleItemRecipe
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 final recordstatic interfaceNested classes/interfaces inherited from interface Recipe
Recipe.BookInfo<CategoryType>, Recipe.CommonInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractCookingRecipe.CookingBookInfoprivate final intprivate final floatFields inherited from class SingleItemRecipe
commonInfoFields inherited from interface Recipe
CODEC, CONDITIONAL_CODEC, KEY_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCookingRecipe(Recipe.CommonInfo commonInfo, AbstractCookingRecipe.CookingBookInfo bookInfo, Ingredient ingredient, ItemStackTemplate result, float experience, int cookingTime) -
Method Summary
Modifier and TypeMethodDescriptioncategory()static <T extends AbstractCookingRecipe>
com.mojang.serialization.MapCodec<T> cookingMapCodec(AbstractCookingRecipe.Factory<T> factory, int defaultCookingTime) static <T extends AbstractCookingRecipe>
StreamCodec<RegistryFriendlyByteBuf, T> cookingStreamCodec(AbstractCookingRecipe.Factory<T> factory) intdisplay()floatprotected abstract Itemabstract RecipeSerializer<? extends AbstractCookingRecipe> abstract RecipeType<? extends AbstractCookingRecipe> getType()group()Methods inherited from class SingleItemRecipe
assemble, input, matches, placementInfo, result, showNotification, simpleMapCodec, simpleStreamCodecMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Recipe
isSpecial, recipeBookCategory
-
Field Details
-
bookInfo
-
experience
private final float experience -
cookingTime
private final int cookingTime
-
-
Constructor Details
-
AbstractCookingRecipe
public AbstractCookingRecipe(Recipe.CommonInfo commonInfo, AbstractCookingRecipe.CookingBookInfo bookInfo, Ingredient ingredient, ItemStackTemplate result, float experience, int cookingTime)
-
-
Method Details
-
getSerializer
- Specified by:
getSerializerin interfaceRecipe<SingleRecipeInput>- Specified by:
getSerializerin classSingleItemRecipe
-
getType
- Specified by:
getTypein interfaceRecipe<SingleRecipeInput>- Specified by:
getTypein classSingleItemRecipe
-
experience
public float experience() -
cookingTime
public int cookingTime() -
category
-
group
-
furnaceIcon
-
display
-
cookingMapCodec
public static <T extends AbstractCookingRecipe> com.mojang.serialization.MapCodec<T> cookingMapCodec(AbstractCookingRecipe.Factory<T> factory, int defaultCookingTime) -
cookingStreamCodec
public static <T extends AbstractCookingRecipe> StreamCodec<RegistryFriendlyByteBuf, T> cookingStreamCodec(AbstractCookingRecipe.Factory<T> factory)
-