Package net.minecraft.core
Class RegistryCodecs
java.lang.Object
net.minecraft.core.RegistryCodecs
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> com.mojang.serialization.Codec<Registry<E>>
dataPackAwareCodec
(ResourceKey<? extends Registry<E>> p_206319_, com.mojang.serialization.Lifecycle p_206320_, com.mojang.serialization.Codec<E> p_206321_) private static <E> com.mojang.serialization.Decoder<Registry<E>>
dataPackAwareDecoder
(ResourceKey<? extends Registry<E>> p_206283_, com.mojang.serialization.Codec<E> p_206284_, com.mojang.serialization.Decoder<Map<ResourceKey<E>, E>> p_206285_, com.mojang.serialization.Lifecycle p_206286_) private static <T> com.mojang.serialization.Codec<Map<ResourceKey<T>,
T>> directCodec
(ResourceKey<? extends Registry<T>> p_206316_, com.mojang.serialization.Codec<T> p_206317_) static <E> com.mojang.serialization.Codec<HolderSet<E>>
homogeneousList
(ResourceKey<? extends Registry<E>> p_206278_) static <E> com.mojang.serialization.Codec<HolderSet<E>>
homogeneousList
(ResourceKey<? extends Registry<E>> p_206311_, boolean p_206312_) static <E> com.mojang.serialization.Codec<HolderSet<E>>
homogeneousList
(ResourceKey<? extends Registry<E>> p_206280_, com.mojang.serialization.Codec<E> p_206281_) static <E> com.mojang.serialization.Codec<HolderSet<E>>
homogeneousList
(ResourceKey<? extends Registry<E>> p_206288_, com.mojang.serialization.Codec<E> p_206289_, boolean p_206290_) static <T> com.mojang.serialization.Codec<Registry<T>>
networkCodec
(ResourceKey<? extends Registry<T>> p_206292_, com.mojang.serialization.Lifecycle p_206293_, com.mojang.serialization.Codec<T> p_206294_) private static <T> com.mojang.serialization.MapCodec<RegistryCodecs.RegistryEntry<T>>
withNameAndId
(ResourceKey<? extends Registry<T>> p_206304_, com.mojang.serialization.MapCodec<T> p_206305_)
-
Constructor Details
-
RegistryCodecs
public RegistryCodecs()
-
-
Method Details
-
withNameAndId
private static <T> com.mojang.serialization.MapCodec<RegistryCodecs.RegistryEntry<T>> withNameAndId(ResourceKey<? extends Registry<T>> p_206304_, com.mojang.serialization.MapCodec<T> p_206305_) -
networkCodec
public static <T> com.mojang.serialization.Codec<Registry<T>> networkCodec(ResourceKey<? extends Registry<T>> p_206292_, com.mojang.serialization.Lifecycle p_206293_, com.mojang.serialization.Codec<T> p_206294_) -
dataPackAwareCodec
public static <E> com.mojang.serialization.Codec<Registry<E>> dataPackAwareCodec(ResourceKey<? extends Registry<E>> p_206319_, com.mojang.serialization.Lifecycle p_206320_, com.mojang.serialization.Codec<E> p_206321_) -
dataPackAwareDecoder
private static <E> com.mojang.serialization.Decoder<Registry<E>> dataPackAwareDecoder(ResourceKey<? extends Registry<E>> p_206283_, com.mojang.serialization.Codec<E> p_206284_, com.mojang.serialization.Decoder<Map<ResourceKey<E>, E>> p_206285_, com.mojang.serialization.Lifecycle p_206286_) -
directCodec
private static <T> com.mojang.serialization.Codec<Map<ResourceKey<T>,T>> directCodec(ResourceKey<? extends Registry<T>> p_206316_, com.mojang.serialization.Codec<T> p_206317_) -
homogeneousList
public static <E> com.mojang.serialization.Codec<HolderSet<E>> homogeneousList(ResourceKey<? extends Registry<E>> p_206280_, com.mojang.serialization.Codec<E> p_206281_) -
homogeneousList
public static <E> com.mojang.serialization.Codec<HolderSet<E>> homogeneousList(ResourceKey<? extends Registry<E>> p_206288_, com.mojang.serialization.Codec<E> p_206289_, boolean p_206290_) -
homogeneousList
public static <E> com.mojang.serialization.Codec<HolderSet<E>> homogeneousList(ResourceKey<? extends Registry<E>> p_206278_) -
homogeneousList
public static <E> com.mojang.serialization.Codec<HolderSet<E>> homogeneousList(ResourceKey<? extends Registry<E>> p_206311_, boolean p_206312_)
-