Class NeoForgeExtraCodecs.AlternativeMapCodec<T>
java.lang.Object
com.mojang.serialization.CompressorHolder
com.mojang.serialization.MapCodec<T>
net.neoforged.neoforge.common.util.NeoForgeExtraCodecs.AlternativeMapCodec<T>
- All Implemented Interfaces:
com.mojang.serialization.Compressable
,com.mojang.serialization.Keyable
,com.mojang.serialization.MapDecoder<T>
,com.mojang.serialization.MapEncoder<T>
- Enclosing class:
NeoForgeExtraCodecs
private static class NeoForgeExtraCodecs.AlternativeMapCodec<T>
extends com.mojang.serialization.MapCodec<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mojang.serialization.MapCodec
com.mojang.serialization.MapCodec.MapCodecCodec<A>, com.mojang.serialization.MapCodec.ResultFunction<A>
Nested classes/interfaces inherited from interface com.mojang.serialization.MapDecoder
com.mojang.serialization.MapDecoder.Implementation<A>
Nested classes/interfaces inherited from interface com.mojang.serialization.MapEncoder
com.mojang.serialization.MapEncoder.Implementation<A>
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
AlternativeMapCodec
(com.mojang.serialization.MapCodec<T> codec, com.mojang.serialization.MapCodec<T> alternative) -
Method Summary
Modifier and TypeMethodDescription<T1> com.mojang.serialization.DataResult
<T> decode
(com.mojang.serialization.DynamicOps<T1> ops, com.mojang.serialization.MapLike<T1> input) <T1> com.mojang.serialization.RecordBuilder
<T1> encode
(T input, com.mojang.serialization.DynamicOps<T1> ops, com.mojang.serialization.RecordBuilder<T1> prefix) <T> Stream
<T> keys
(com.mojang.serialization.DynamicOps<T> ops) toString()
Methods inherited from class com.mojang.serialization.MapCodec
assumeMapUnsafe, codec, dependent, deprecated, fieldOf, flatXmap, forGetter, mapResult, of, of, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, recursive, setPartial, stable, unit, unit, validate, withLifecycle, xmap
Methods inherited from class com.mojang.serialization.CompressorHolder
compressor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.serialization.MapDecoder
ap, compressedDecode, compressor, decoder, flatMap, map
Methods inherited from interface com.mojang.serialization.MapEncoder
comap, compressedBuilder, compressor, encoder, flatComap
-
Field Details
-
codec
-
alternative
-
-
Constructor Details
-
AlternativeMapCodec
-
-
Method Details
-
keys
- Specified by:
keys
in interfacecom.mojang.serialization.Keyable
- Specified by:
keys
in classcom.mojang.serialization.MapCodec<T>
-
decode
public <T1> com.mojang.serialization.DataResult<T> decode(com.mojang.serialization.DynamicOps<T1> ops, com.mojang.serialization.MapLike<T1> input) -
encode
public <T1> com.mojang.serialization.RecordBuilder<T1> encode(T input, com.mojang.serialization.DynamicOps<T1> ops, com.mojang.serialization.RecordBuilder<T1> prefix) -
toString
-