Record Class ConditionCodec.UnwrapDecoder<A>
java.lang.Object
java.lang.Record
net.minecraftforge.common.crafting.conditions.ConditionCodec.UnwrapDecoder<A>
- All Implemented Interfaces:
- com.mojang.serialization.Decoder<A>
- Enclosing class:
- ConditionCodec
- 
Nested Class Summary
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateUnwrapDecoder(com.mojang.serialization.Decoder<Optional<A>> normal, Supplier<A> _default) Creates an instance of aUnwrapDecoderrecord class.
- 
Method SummaryModifier and TypeMethodDescription_default()Returns the value of the_defaultrecord component.<T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<A,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.normal()Returns the value of thenormalrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mojang.serialization.Decoderboxed, decode, fieldOf, flatMap, map, parse, parse, promotePartial, simple, terminal, withLifecycle
- 
Field Details- 
normalThe field for thenormalrecord component.
- 
_defaultThe field for the_defaultrecord component.
 
- 
- 
Constructor Details- 
UnwrapDecoderCreates an instance of aUnwrapDecoderrecord class.- Parameters:
- normal- the value for the- normalrecord component
- _default- the value for the- _defaultrecord component
 
 
- 
- 
Method Details- 
decodepublic <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<A,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input) - Specified by:
- decodein interface- com.mojang.serialization.Decoder<A>
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
normalReturns the value of thenormalrecord component.- Returns:
- the value of the normalrecord component
 
- 
_defaultReturns the value of the_defaultrecord component.- Returns:
- the value of the _defaultrecord component
 
 
-