Package net.minecraft.util.registry
Class RegistryEntryListCodec<E>
java.lang.Object
net.minecraft.util.registry.RegistryEntryListCodec<E>
- All Implemented Interfaces:
com.mojang.serialization.Codec<RegistryEntryList<E>>
,com.mojang.serialization.Decoder<RegistryEntryList<E>>
,com.mojang.serialization.Encoder<RegistryEntryList<E>>
public class RegistryEntryListCodec<E>
extends Object
implements com.mojang.serialization.Codec<RegistryEntryList<E>>
- Mappings:
Namespace Name official aac
intermediary net/minecraft/class_6898
named net/minecraft/util/registry/RegistryEntryListCodec
-
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 final com.mojang.serialization.Codec<List<RegistryEntry<E>>>
private final com.mojang.serialization.Codec<RegistryEntry<E>>
private final com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<TagKey<E>,
List<RegistryEntry<E>>>> private final RegistryKey<? 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
RegistryEntryListCodec
(RegistryKey<? extends Registry<E>> registry, com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> com.mojang.serialization.Codec<RegistryEntryList<E>>
create
(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) private static <E> com.mojang.serialization.Codec<List<RegistryEntry<E>>>
createDirectEntryListCodec
(com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntryList<E>,
T>> decode
(com.mojang.serialization.DynamicOps<T> ops, T input) private <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntryList<E>,
T>> decodeDirect
(com.mojang.serialization.DynamicOps<T> ops, T input) <T> com.mojang.serialization.DataResult<T>
encode
(RegistryEntryList<E> registryEntryList, com.mojang.serialization.DynamicOps<T> dynamicOps, T t) private <T> com.mojang.serialization.DataResult<T>
encodeDirect
(RegistryEntryList<E> entryList, com.mojang.serialization.DynamicOps<T> ops, T prefix) 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, 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
-
registry
- Mappings:
Namespace Name Mixin selector official a
Laac;a:Laai;
intermediary field_36480
Lnet/minecraft/class_6898;field_36480:Lnet/minecraft/class_5321;
named registry
Lnet/minecraft/util/registry/RegistryEntryListCodec;registry:Lnet/minecraft/util/registry/RegistryKey;
-
entryCodec
- Mappings:
Namespace Name Mixin selector official b
Laac;b:Lcom/mojang/serialization/Codec;
intermediary field_36481
Lnet/minecraft/class_6898;field_36481:Lcom/mojang/serialization/Codec;
named entryCodec
Lnet/minecraft/util/registry/RegistryEntryListCodec;entryCodec:Lcom/mojang/serialization/Codec;
-
directEntryListCodec
- Mappings:
Namespace Name Mixin selector official c
Laac;c:Lcom/mojang/serialization/Codec;
intermediary field_36482
Lnet/minecraft/class_6898;field_36482:Lcom/mojang/serialization/Codec;
named directEntryListCodec
Lnet/minecraft/util/registry/RegistryEntryListCodec;directEntryListCodec:Lcom/mojang/serialization/Codec;
-
entryListStorageCodec
private final com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<TagKey<E>,List<RegistryEntry<E>>>> entryListStorageCodec- Mappings:
Namespace Name Mixin selector official d
Laac;d:Lcom/mojang/serialization/Codec;
intermediary field_36483
Lnet/minecraft/class_6898;field_36483:Lcom/mojang/serialization/Codec;
named entryListStorageCodec
Lnet/minecraft/util/registry/RegistryEntryListCodec;entryListStorageCodec:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
RegistryEntryListCodec
private RegistryEntryListCodec(RegistryKey<? extends Registry<E>> registry, com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) - Parameters:
alwaysSerializeAsList
- whether to always serialize the list as a list instead of serializing as one entry if the length is0
- Mappings:
Namespace Name Mixin selector official <init>
Laac;<init>(Laai;Lcom/mojang/serialization/Codec;Z)V
intermediary <init>
Lnet/minecraft/class_6898;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;Z)V
named <init>
Lnet/minecraft/util/registry/RegistryEntryListCodec;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;Z)V
-
-
Method Details
-
createDirectEntryListCodec
private static <E> com.mojang.serialization.Codec<List<RegistryEntry<E>>> createDirectEntryListCodec(com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) - Parameters:
alwaysSerializeAsList
- whether to always serialize the list as a list instead of serializing as one entry if the length is0
- Mappings:
Namespace Name Mixin selector official a
Laac;a(Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
intermediary method_40382
Lnet/minecraft/class_6898;method_40382(Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
named createDirectEntryListCodec
Lnet/minecraft/util/registry/RegistryEntryListCodec;createDirectEntryListCodec(Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
-
create
public static <E> com.mojang.serialization.Codec<RegistryEntryList<E>> create(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<RegistryEntry<E>> entryCodec, boolean alwaysSerializeAsList) - Parameters:
alwaysSerializeAsList
- whether to always serialize the list as a list instead of serializing as one entry if the length is0
- Mappings:
Namespace Name Mixin selector official a
Laac;a(Laai;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
intermediary method_40388
Lnet/minecraft/class_6898;method_40388(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
named create
Lnet/minecraft/util/registry/RegistryEntryListCodec;create(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
-
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntryList<E>,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input) - Specified by:
decode
in interfacecom.mojang.serialization.Decoder<E>
- Mappings:
Namespace Name Mixin selector official decode
Laac;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary decode
Lnet/minecraft/class_6898;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named decode
Lnet/minecraft/util/registry/RegistryEntryListCodec;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-
encode
public <T> com.mojang.serialization.DataResult<T> encode(RegistryEntryList<E> registryEntryList, com.mojang.serialization.DynamicOps<T> dynamicOps, T t) - Specified by:
encode
in interfacecom.mojang.serialization.Encoder<E>
- Mappings:
Namespace Name Mixin selector official a
Laac;a(Lhe;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary method_40384
Lnet/minecraft/class_6898;method_40384(Lnet/minecraft/class_6885;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named encode
Lnet/minecraft/util/registry/RegistryEntryListCodec;encode(Lnet/minecraft/util/registry/RegistryEntryList;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-
decodeDirect
private <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntryList<E>,T>> decodeDirect(com.mojang.serialization.DynamicOps<T> ops, T input) - Mappings:
Namespace Name Mixin selector official a
Laac;a(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary method_40383
Lnet/minecraft/class_6898;method_40383(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named decodeDirect
Lnet/minecraft/util/registry/RegistryEntryListCodec;decodeDirect(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-
encodeDirect
private <T> com.mojang.serialization.DataResult<T> encodeDirect(RegistryEntryList<E> entryList, com.mojang.serialization.DynamicOps<T> ops, T prefix) - Mappings:
Namespace Name Mixin selector official b
Laac;b(Lhe;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary method_40389
Lnet/minecraft/class_6898;method_40389(Lnet/minecraft/class_6885;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named encodeDirect
Lnet/minecraft/util/registry/RegistryEntryListCodec;encodeDirect(Lnet/minecraft/util/registry/RegistryEntryList;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-