Package net.minecraft.registry
Class RegistryCodecs
java.lang.Object
net.minecraft.registry.RegistryCodecs
A utility class for serialization of registries using codecs.
- Mappings:
Namespace Name official hs
intermediary net/minecraft/class_6895
named net/minecraft/registry/RegistryCodecs
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final record
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> com.mojang.serialization.Codec<Registry<E>>
createKeyedRegistryCodec
(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Lifecycle lifecycle, com.mojang.serialization.Codec<E> elementCodec) static <T> com.mojang.serialization.Codec<Registry<T>>
createRegistryCodec
(RegistryKey<? extends Registry<T>> registryRef, com.mojang.serialization.Lifecycle lifecycle, com.mojang.serialization.Codec<T> elementCodec) static <E> com.mojang.serialization.Codec<RegistryEntryList<E>>
entryList
(RegistryKey<? extends Registry<E>> registryRef) static <E> com.mojang.serialization.Codec<RegistryEntryList<E>>
entryList
(RegistryKey<? extends Registry<E>> registryRef, boolean alwaysSerializeAsList) static <E> com.mojang.serialization.Codec<RegistryEntryList<E>>
entryList
(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<E> elementCodec) static <E> com.mojang.serialization.Codec<RegistryEntryList<E>>
entryList
(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<E> elementCodec, boolean alwaysSerializeAsList) private static <T> com.mojang.serialization.MapCodec<RegistryCodecs.RegistryManagerEntry<T>>
managerEntry
(RegistryKey<? extends Registry<T>> registryRef, com.mojang.serialization.MapCodec<T> elementCodec)
-
Constructor Details
-
RegistryCodecs
public RegistryCodecs()
-
-
Method Details
-
managerEntry
private static <T> com.mojang.serialization.MapCodec<RegistryCodecs.RegistryManagerEntry<T>> managerEntry(RegistryKey<? extends Registry<T>> registryRef, com.mojang.serialization.MapCodec<T> elementCodec) - Mappings:
Namespace Name Mixin selector official a
Lhs;a(Laev;Lcom/mojang/serialization/MapCodec;)Lcom/mojang/serialization/MapCodec;
intermediary method_40347
Lnet/minecraft/class_6895;method_40347(Lnet/minecraft/class_5321;Lcom/mojang/serialization/MapCodec;)Lcom/mojang/serialization/MapCodec;
named managerEntry
Lnet/minecraft/registry/RegistryCodecs;managerEntry(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/MapCodec;)Lcom/mojang/serialization/MapCodec;
-
createRegistryCodec
public static <T> com.mojang.serialization.Codec<Registry<T>> createRegistryCodec(RegistryKey<? extends Registry<T>> registryRef, com.mojang.serialization.Lifecycle lifecycle, com.mojang.serialization.Codec<T> elementCodec) - Mappings:
Namespace Name Mixin selector official a
Lhs;a(Laev;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
intermediary method_40344
Lnet/minecraft/class_6895;method_40344(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
named createRegistryCodec
Lnet/minecraft/registry/RegistryCodecs;createRegistryCodec(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
createKeyedRegistryCodec
public static <E> com.mojang.serialization.Codec<Registry<E>> createKeyedRegistryCodec(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Lifecycle lifecycle, com.mojang.serialization.Codec<E> elementCodec) - Mappings:
Namespace Name Mixin selector official b
Lhs;b(Laev;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
intermediary method_45947
Lnet/minecraft/class_6895;method_45947(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
named createKeyedRegistryCodec
Lnet/minecraft/registry/RegistryCodecs;createKeyedRegistryCodec(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
entryList
public static <E> com.mojang.serialization.Codec<RegistryEntryList<E>> entryList(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<E> elementCodec) - Mappings:
Namespace Name Mixin selector official a
Lhs;a(Laev;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
intermediary method_40341
Lnet/minecraft/class_6895;method_40341(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
named entryList
Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
entryList
public static <E> com.mojang.serialization.Codec<RegistryEntryList<E>> entryList(RegistryKey<? extends Registry<E>> registryRef, com.mojang.serialization.Codec<E> elementCodec, 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
Lhs;a(Laev;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
intermediary method_40343
Lnet/minecraft/class_6895;method_40343(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
named entryList
Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/Codec;
-
entryList
public static <E> com.mojang.serialization.Codec<RegistryEntryList<E>> entryList(RegistryKey<? extends Registry<E>> registryRef) - Mappings:
Namespace Name Mixin selector official a
Lhs;a(Laev;)Lcom/mojang/serialization/Codec;
intermediary method_40340
Lnet/minecraft/class_6895;method_40340(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;
named entryList
Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
-
entryList
public static <E> com.mojang.serialization.Codec<RegistryEntryList<E>> entryList(RegistryKey<? extends Registry<E>> registryRef, 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
Lhs;a(Laev;Z)Lcom/mojang/serialization/Codec;
intermediary method_40349
Lnet/minecraft/class_6895;method_40349(Lnet/minecraft/class_5321;Z)Lcom/mojang/serialization/Codec;
named entryList
Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;Z)Lcom/mojang/serialization/Codec;
-