Record Class CookieCuttingRecipe
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.cookieCutter.CookieCuttingRecipe
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
@ParametersAreNonnullByDefault
public record CookieCuttingRecipe(List<IAdvancedIngredient<DoughData>> doughIngredients, net.minecraft.world.item.crafting.Ingredient cutterIngredient, net.minecraft.core.Holder<DoughCut> cut, List<net.minecraft.world.item.ItemStack> results)
extends Record
implements net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CookieCuttingRecipe> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CookieCuttingRecipe> static final net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CONDITIONAL_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCookieCuttingRecipe(List<IAdvancedIngredient<DoughData>> doughIngredients, net.minecraft.world.item.crafting.Ingredient cutterIngredient, net.minecraft.core.Holder<DoughCut> cut, List<net.minecraft.world.item.ItemStack> results) Creates an instance of aCookieCuttingReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackassemble(CookieCuttingRecipe.Input input, net.minecraft.core.HolderLookup.Provider registries) booleancanCraftInDimensions(int width, int height) net.minecraft.core.Holder<DoughCut> cut()Returns the value of thecutrecord component.net.minecraft.world.item.crafting.IngredientReturns the value of thecutterIngredientrecord component.Returns the value of thedoughIngredientsrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.HolderLookup.Provider registries) net.minecraft.world.item.crafting.RecipeSerializer<CookieCuttingRecipe> net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> getType()final inthashCode()Returns a hash code value for this object.booleanmatches(CookieCuttingRecipe.Input input, net.minecraft.world.level.Level level) List<net.minecraft.world.item.ItemStack> results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getToastSymbol, isIncomplete, isSpecial, showNotification
-
Field Details
-
TYPE
public static final net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> TYPE -
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,CookieCuttingRecipe> STREAM_CODEC
-
-
Constructor Details
-
CookieCuttingRecipe
public CookieCuttingRecipe(List<IAdvancedIngredient<DoughData>> doughIngredients, net.minecraft.world.item.crafting.Ingredient cutterIngredient, net.minecraft.core.Holder<DoughCut> cut, List<net.minecraft.world.item.ItemStack> results) Creates an instance of aCookieCuttingReciperecord class.- Parameters:
doughIngredients- the value for thedoughIngredientsrecord componentcutterIngredient- the value for thecutterIngredientrecord componentcut- the value for thecutrecord componentresults- the value for theresultsrecord component
-
-
Method Details
-
matches
- Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
assemble
public net.minecraft.world.item.ItemStack assemble(CookieCuttingRecipe.Input input, net.minecraft.core.HolderLookup.Provider registries) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.HolderLookup.Provider registries) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
getSerializer
- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
getType
public net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
doughIngredients
Returns the value of thedoughIngredientsrecord component.- Returns:
- the value of the
doughIngredientsrecord component
-
cutterIngredient
public net.minecraft.world.item.crafting.Ingredient cutterIngredient()Returns the value of thecutterIngredientrecord component.- Returns:
- the value of the
cutterIngredientrecord component
-
cut
Returns the value of thecutrecord component.- Returns:
- the value of the
cutrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-