Record Class ProcessingPatternState.Input
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.autocrafting.ProcessingPatternState.Input
- Enclosing class:
ProcessingPatternState
public static record ProcessingPatternState.Input(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ProcessingPatternState.Input> static final com.mojang.serialization.Codec
<Optional<ProcessingPatternState.Input>> static final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, Optional<ProcessingPatternState.Input>> static final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, ProcessingPatternState.Input> -
Constructor Summary
ConstructorDescriptionInput
(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds) Creates an instance of aInput
record class. -
Method Summary
Modifier and TypeMethodDescriptionList
<net.minecraft.resources.ResourceLocation> Returns the value of theallowedAlternativeIds
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.input()
Returns the value of theinput
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CODEC
-
OPTIONAL_CODEC
public static final com.mojang.serialization.Codec<Optional<ProcessingPatternState.Input>> OPTIONAL_CODEC -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ProcessingPatternState.Input> STREAM_CODEC -
OPTIONAL_STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Optional<ProcessingPatternState.Input>> OPTIONAL_STREAM_CODEC
-
-
Constructor Details
-
Input
public Input(ResourceAmount input, List<net.minecraft.resources.ResourceLocation> allowedAlternativeIds) Creates an instance of aInput
record class.- Parameters:
input
- the value for theinput
record componentallowedAlternativeIds
- the value for theallowedAlternativeIds
record component
-
-
Method Details
-
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 theinput
record component.- Returns:
- the value of the
input
record component
-
allowedAlternativeIds
Returns the value of theallowedAlternativeIds
record component.- Returns:
- the value of the
allowedAlternativeIds
record component
-