Package net.minecraft.util
Record Class ExtraCodecs.XorCodec<F,S> 
java.lang.Object
java.lang.Record
net.minecraft.util.ExtraCodecs.XorCodec<F,S> 
- All Implemented Interfaces:
- com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<F,,- S>> - com.mojang.serialization.Decoder<com.mojang.datafixers.util.Either<F,,- S>> - com.mojang.serialization.Encoder<com.mojang.datafixers.util.Either<F,- S>> 
- Enclosing class:
- ExtraCodecs
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.mojang.serialization.Codeccom.mojang.serialization.Codec.ResultFunction<A extends Object>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<F>The field for thefirstrecord component.private final com.mojang.serialization.Codec<S>The field for thesecondrecord component.Fields inherited from interface com.mojang.serialization.CodecBOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<com.mojang.datafixers.util.Either<F,S>, T>> decode(com.mojang.serialization.DynamicOps<T> p_144679_, T p_144680_) <T> com.mojang.serialization.DataResult<T>encode(com.mojang.datafixers.util.Either<F, S> p_144663_, com.mojang.serialization.DynamicOps<T> p_144664_, T p_144665_) final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.Codec<F>first()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.com.mojang.serialization.Codec<S>second()Returns the value of thesecondrecord component.toString()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.CodeccomapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, stable, withLifecycle, xmapMethods inherited from interface com.mojang.serialization.Decoderboxed, decode, flatMap, map, parse, parse, simple, terminalMethods inherited from interface com.mojang.serialization.Encodercomap, encodeStart, flatComap
- 
Field Details- 
firstThe field for thefirstrecord component.
- 
secondThe field for thesecondrecord component.
 
- 
- 
Constructor Details- 
XorCodecCreates an instance of aXorCodecrecord class.- Parameters:
- first- the value for the- firstrecord component
- second- the value for the- secondrecord component
 
 
- 
- 
Method Details- 
decodepublic <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<com.mojang.datafixers.util.Either<F,S>, decodeT>> (com.mojang.serialization.DynamicOps<T> p_144679_, T p_144680_) - Specified by:
- decodein interface- com.mojang.serialization.Decoder<F>
 
- 
encodepublic <T> com.mojang.serialization.DataResult<T> encode(com.mojang.datafixers.util.Either<F, S> p_144663_, com.mojang.serialization.DynamicOps<T> p_144664_, T p_144665_) - Specified by:
- encodein interface- com.mojang.serialization.Encoder<F>
 
- 
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).
- 
firstReturns the value of thefirstrecord component.- Returns:
- the value of the firstrecord component
 
- 
secondReturns the value of thesecondrecord component.- Returns:
- the value of the secondrecord component
 
 
-