Record Class ProcessingPatternState.ProcessingIngredient
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.autocrafting.ProcessingPatternState.ProcessingIngredient
- Enclosing class:
ProcessingPatternState
public static record ProcessingPatternState.ProcessingIngredient(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProcessingPatternState.ProcessingIngredient> static final com.mojang.serialization.Codec<Optional<ProcessingPatternState.ProcessingIngredient>> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Optional<ProcessingPatternState.ProcessingIngredient>> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ProcessingPatternState.ProcessingIngredient> -
Constructor Summary
ConstructorsConstructorDescriptionProcessingIngredient(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds) Creates an instance of aProcessingIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.resources.ResourceLocation> Returns the value of theallowedAlternativeIdsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
public static final com.mojang.serialization.Codec<ProcessingPatternState.ProcessingIngredient> CODEC -
OPTIONAL_CODEC
public static final com.mojang.serialization.Codec<Optional<ProcessingPatternState.ProcessingIngredient>> OPTIONAL_CODEC -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ProcessingPatternState.ProcessingIngredient> STREAM_CODEC -
OPTIONAL_STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Optional<ProcessingPatternState.ProcessingIngredient>> OPTIONAL_STREAM_CODEC
-
-
Constructor Details
-
ProcessingIngredient
public ProcessingIngredient(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds) Creates an instance of aProcessingIngredientrecord class.- Parameters:
input- the value for theinputrecord componentallowedAlternativeIds- the value for theallowedAlternativeIdsrecord component
-
-
Method Details
-
toIngredient
-
calculateInputsIncludingAlternatives
-
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). -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
allowedAlternativeIds
Returns the value of theallowedAlternativeIdsrecord component.- Returns:
- the value of the
allowedAlternativeIdsrecord component
-