Package net.minecraftforge.common
Class LenientUnboundedMapCodec<K,V>
java.lang.Object
net.minecraftforge.common.LenientUnboundedMapCodec<K,V>
- All Implemented Interfaces:
com.mojang.serialization.Codec<Map<K,V>>
,com.mojang.serialization.codecs.BaseMapCodec<K,V>
,com.mojang.serialization.Decoder<Map<K,V>>
,com.mojang.serialization.Encoder<Map<K,V>>
public class LenientUnboundedMapCodec<K,V>
extends Object
implements com.mojang.serialization.codecs.BaseMapCodec<K,V>, com.mojang.serialization.Codec<Map<K,V>>
Key and value decoded independently, unknown set of keys
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.serialization.Codec
com.mojang.serialization.Codec.ResultFunction<A extends Object>
-
Field Summary
Modifier and TypeFieldDescriptionprivate com.mojang.serialization.Codec<V>
private com.mojang.serialization.Codec<K>
Fields inherited from interface com.mojang.serialization.Codec
BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
-
Constructor Summary
ConstructorDescriptionLenientUnboundedMapCodec(com.mojang.serialization.Codec<K> keyCodec, com.mojang.serialization.Codec<V> elementCodec)
-
Method Summary
Modifier and TypeMethodDescriptiondecode(com.mojang.serialization.DynamicOps<T> ops, com.mojang.serialization.MapLike<T> input)
decode(com.mojang.serialization.DynamicOps<T> ops, T input)
com.mojang.serialization.Codec<V>
<T> com.mojang.serialization.DataResult<T>
boolean
int
hashCode()
com.mojang.serialization.Codec<K>
keyCodec()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.serialization.codecs.BaseMapCodec
encode
Methods inherited from interface com.mojang.serialization.Codec
comapFlatMap, 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, xmap
Methods inherited from interface com.mojang.serialization.Decoder
boxed, decode, flatMap, map, parse, parse, simple, terminal
Methods inherited from interface com.mojang.serialization.Encoder
comap, encodeStart, flatComap
-
Field Details
-
keyCodec
-
elementCodec
-
-
Constructor Details
-
LenientUnboundedMapCodec
-
-
Method Details
-
keyCodec
-
elementCodec
-
decode
-
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Map<K,V>,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input)- Specified by:
decode
in interfacecom.mojang.serialization.Decoder<K>
-
encode
public <T> com.mojang.serialization.DataResult<T> encode(Map<K,V> input, com.mojang.serialization.DynamicOps<T> ops, T prefix)- Specified by:
encode
in interfacecom.mojang.serialization.Encoder<K>
-
equals
-
hashCode
public int hashCode() -
toString
-