Package net.minecraft.resources
Class RegistryFileCodec<E>
java.lang.Object
net.minecraft.resources.RegistryFileCodec<E>
- All Implemented Interfaces:
com.mojang.serialization.Codec<Supplier<E>>
,com.mojang.serialization.Decoder<Supplier<E>>
,com.mojang.serialization.Encoder<Supplier<E>>
-
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 boolean
private com.mojang.serialization.Codec<E>
private 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
RegistryFileCodec(ResourceKey<? extends Registry<E>> p_135574_, com.mojang.serialization.Codec<E> p_135575_, boolean p_135576_)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> RegistryFileCodec<E>
create(ResourceKey<? extends Registry<E>> p_135590_, com.mojang.serialization.Codec<E> p_135591_)
private static <E> RegistryFileCodec<E>
create(ResourceKey<? extends Registry<E>> p_135593_, com.mojang.serialization.Codec<E> p_135594_, boolean p_135595_)
decode(com.mojang.serialization.DynamicOps<T> p_135608_, T p_135609_)
<T> com.mojang.serialization.DataResult<T>
homogeneousList(ResourceKey<? extends Registry<E>> p_135601_, com.mojang.serialization.Codec<E> p_135602_)
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
-
registryKey
-
elementCodec
-
allowInline
private final boolean allowInline
-
-
Constructor Details
-
RegistryFileCodec
private RegistryFileCodec(ResourceKey<? extends Registry<E>> p_135574_, com.mojang.serialization.Codec<E> p_135575_, boolean p_135576_)
-
-
Method Details
-
create
public static <E> RegistryFileCodec<E> create(ResourceKey<? extends Registry<E>> p_135590_, com.mojang.serialization.Codec<E> p_135591_) -
homogeneousList
public static <E> com.mojang.serialization.Codec<List<Supplier<E>>> homogeneousList(ResourceKey<? extends Registry<E>> p_135601_, com.mojang.serialization.Codec<E> p_135602_) -
create
private static <E> RegistryFileCodec<E> create(ResourceKey<? extends Registry<E>> p_135593_, com.mojang.serialization.Codec<E> p_135594_, boolean p_135595_) -
encode
public <T> com.mojang.serialization.DataResult<T> encode(Supplier<E> p_135586_, com.mojang.serialization.DynamicOps<T> p_135587_, T p_135588_)- Specified by:
encode
in interfacecom.mojang.serialization.Encoder<E>
-
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Supplier<E>,T>> decode(com.mojang.serialization.DynamicOps<T> p_135608_, T p_135609_)- Specified by:
decode
in interfacecom.mojang.serialization.Decoder<E>
-
toString
-