Record Class DryingRecipe
java.lang.Object
java.lang.Record
com.petrolpark.core.item.decay.drying.DryingRecipe
- All Implemented Interfaces:
IApplyDecayRecipe,net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
public record DryingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, IDecayProduct decayProduct, DecayTime decayTime)
extends Record
implements IApplyDecayRecipe
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.petrolpark.core.item.decay.IApplyDecayRecipe
IApplyDecayRecipe.Factory<R extends IApplyDecayRecipe> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DryingRecipe> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, DryingRecipe> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CONDITIONAL_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionDryingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, IDecayProduct decayProduct, DecayTime decayTime) Creates an instance of aDryingReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedecayProductrecord component.Returns the value of thedecayTimerecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.crafting.RecipeSerializer<DryingRecipe> net.minecraft.world.item.crafting.RecipeType<DryingRecipe> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientReturns the value of theingredientrecord 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 com.petrolpark.core.item.decay.IApplyDecayRecipe
assemble, assemble, canCraftInDimensions, getResultItem, matches, setDecayProductAndTime, streamResultsMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getToastSymbol, isIncomplete, isSpecial, showNotification
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,DryingRecipe> STREAM_CODEC
-
-
Constructor Details
-
DryingRecipe
public DryingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, IDecayProduct decayProduct, DecayTime decayTime) Creates an instance of aDryingReciperecord class.- Parameters:
ingredient- the value for theingredientrecord componentdecayProduct- the value for thedecayProductrecord componentdecayTime- the value for thedecayTimerecord component
-
-
Method Details
-
getSerializer
- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
-
getType
- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
-
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). -
ingredient
public net.minecraft.world.item.crafting.Ingredient ingredient()Returns the value of theingredientrecord component.- Specified by:
ingredientin interfaceIApplyDecayRecipe- Returns:
- the value of the
ingredientrecord component
-
decayProduct
Returns the value of thedecayProductrecord component.- Specified by:
decayProductin interfaceIApplyDecayRecipe- Returns:
- the value of the
decayProductrecord component
-
decayTime
Returns the value of thedecayTimerecord component.- Specified by:
decayTimein interfaceIApplyDecayRecipe- Returns:
- the value of the
decayTimerecord component
-