Package net.minecraft.resources
Class HolderSetCodec<E>
java.lang.Object
net.minecraft.resources.HolderSetCodec<E>
- All Implemented Interfaces:
com.mojang.serialization.Codec<HolderSet<E>>
,com.mojang.serialization.Decoder<HolderSet<E>>
,com.mojang.serialization.Encoder<HolderSet<E>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.serialization.Codec
com.mojang.serialization.Codec.RecursiveCodec<T>, com.mojang.serialization.Codec.ResultFunction<A>
Nested classes/interfaces inherited from interface com.mojang.serialization.Decoder
com.mojang.serialization.Decoder.Boxed<A>, com.mojang.serialization.Decoder.Simple<A>, com.mojang.serialization.Decoder.Terminal<A>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec
<com.mojang.datafixers.util.Either<ICustomHolderSet<E>, com.mojang.datafixers.util.Either<TagKey<E>, List<Holder<E>>>>> private final com.mojang.serialization.Codec
<ICustomHolderSet<E>> private final com.mojang.serialization.Codec
<com.mojang.datafixers.util.Either<TagKey<E>, List<Holder<E>>>> private final ResourceKey
<? extends Registry<E>> 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
ModifierConstructorDescriptionprivate
HolderSetCodec
(ResourceKey<? extends Registry<E>> p_206660_, com.mojang.serialization.Codec<Holder<E>> p_206661_, boolean p_206662_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> com.mojang.serialization.Codec
<HolderSet<E>> create
(ResourceKey<? extends Registry<E>> p_206686_, com.mojang.serialization.Codec<Holder<E>> p_206687_, boolean p_206688_) decode
(com.mojang.serialization.DynamicOps<T> p_206696_, T p_206697_) decodeWithoutRegistry
(com.mojang.serialization.DynamicOps<T> p_206671_, T p_206672_) <T> com.mojang.serialization.DataResult
<T> private <T> com.mojang.serialization.DataResult
<T> encodeWithoutRegistry
(HolderSet<E> p_206690_, com.mojang.serialization.DynamicOps<T> p_206691_, T p_206692_) homogenousList
(com.mojang.serialization.Codec<Holder<E>> p_206668_, boolean p_206669_) private static <E> com.mojang.serialization.DataResult
<HolderSet<E>> lookupTag
(HolderGetter<E> p_332757_, TagKey<E> p_332743_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.serialization.Codec
comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, listOf, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, sizeLimitedListOf, stable, validate, 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
-
registryKey
-
elementCodec
-
homogenousListCodec
-
registryAwareCodec
-
forgeDispatchCodec
-
combinedCodec
-
-
Constructor Details
-
HolderSetCodec
private HolderSetCodec(ResourceKey<? extends Registry<E>> p_206660_, com.mojang.serialization.Codec<Holder<E>> p_206661_, boolean p_206662_)
-
-
Method Details
-
homogenousList
-
create
public static <E> com.mojang.serialization.Codec<HolderSet<E>> create(ResourceKey<? extends Registry<E>> p_206686_, com.mojang.serialization.Codec<Holder<E>> p_206687_, boolean p_206688_) -
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<HolderSet<E>,T>> decode(com.mojang.serialization.DynamicOps<T> p_206696_, T p_206697_) - Specified by:
decode
in interfacecom.mojang.serialization.Decoder<E>
-
lookupTag
private static <E> com.mojang.serialization.DataResult<HolderSet<E>> lookupTag(HolderGetter<E> p_332757_, TagKey<E> p_332743_) -
encode
public <T> com.mojang.serialization.DataResult<T> encode(HolderSet<E> p_206674_, com.mojang.serialization.DynamicOps<T> p_206675_, T p_206676_) - Specified by:
encode
in interfacecom.mojang.serialization.Encoder<E>
-
decodeWithoutRegistry
-
encodeWithoutRegistry
-