Class RegistryCodecs

java.lang.Object
net.minecraft.registry.RegistryCodecs

public class RegistryCodecs extends Object
A utility class for serialization of registries using codecs.
Mappings:
Namespace Name
named net/minecraft/registry/RegistryCodecs
intermediary net/minecraft/class_6895
official kb
  • Constructor Details

    • RegistryCodecs

      public RegistryCodecs()
  • Method Details

    • 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
      named entryList Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;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;
      official a Lkb;a(Lakq;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 is 0
      Mappings:
      Namespace Name Mixin selector
      named entryList Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;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;
      official a Lkb;a(Lakq;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
      named entryList Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
      intermediary method_40340 Lnet/minecraft/class_6895;method_40340(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;
      official a Lkb;a(Lakq;)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 is 0
      Mappings:
      Namespace Name Mixin selector
      named entryList Lnet/minecraft/registry/RegistryCodecs;entryList(Lnet/minecraft/registry/RegistryKey;Z)Lcom/mojang/serialization/Codec;
      intermediary method_40349 Lnet/minecraft/class_6895;method_40349(Lnet/minecraft/class_5321;Z)Lcom/mojang/serialization/Codec;
      official a Lkb;a(Lakq;Z)Lcom/mojang/serialization/Codec;