Class RegistryLookupCodec<E>

java.lang.Object
com.mojang.serialization.CompressorHolder
com.mojang.serialization.MapCodec<Registry<E>>
net.minecraft.util.dynamic.RegistryLookupCodec<E>
All Implemented Interfaces:
com.mojang.serialization.Compressable, com.mojang.serialization.Keyable, com.mojang.serialization.MapDecoder<Registry<E>>, com.mojang.serialization.MapEncoder<Registry<E>>

public final class RegistryLookupCodec<E> extends com.mojang.serialization.MapCodec<Registry<E>>
Mappings:
Namespace Name
official yc
intermediary net/minecraft/class_5505
named net/minecraft/util/dynamic/RegistryLookupCodec
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.mojang.serialization.MapCodec

    com.mojang.serialization.MapCodec.MapCodecCodec<A extends Object>, com.mojang.serialization.MapCodec.ResultFunction<A extends Object>

    Nested classes/interfaces inherited from interface com.mojang.serialization.MapDecoder

    com.mojang.serialization.MapDecoder.Implementation<A extends Object>

    Nested classes/interfaces inherited from interface com.mojang.serialization.MapEncoder

    com.mojang.serialization.MapEncoder.Implementation<A extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final RegistryKey<? extends Registry<E>>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    RegistryLookupCodec(RegistryKey<? extends Registry<E>> registryKey)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> com.mojang.serialization.DataResult<Registry<E>>
    decode(com.mojang.serialization.DynamicOps<T> dynamicOps, com.mojang.serialization.MapLike<T> mapLike)
     
    <T> com.mojang.serialization.RecordBuilder<T>
    encode(Registry<E> registry, com.mojang.serialization.DynamicOps<T> dynamicOps, com.mojang.serialization.RecordBuilder<T> recordBuilder)
     
    <T> Stream<T>
    keys(com.mojang.serialization.DynamicOps<T> dynamicOps)
     
    static <E> RegistryLookupCodec<E>
    of(RegistryKey<? extends Registry<E>> registryKey)
     
     

    Methods inherited from class com.mojang.serialization.MapCodec

    codec, dependent, deprecated, fieldOf, flatXmap, forGetter, mapResult, of, of, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, setPartial, stable, unit, unit, withLifecycle, xmap

    Methods inherited from class com.mojang.serialization.CompressorHolder

    compressor

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.mojang.serialization.MapDecoder

    ap, compressedDecode, compressor, decoder, flatMap, map

    Methods inherited from interface com.mojang.serialization.MapEncoder

    comap, compressedBuilder, compressor, encoder, flatComap
  • Field Details

    • registryKey

      private final RegistryKey<? extends Registry<E>> registryKey
      Mappings:
      Namespace Name Mixin selector
      official a Lyc;a:Lyg;
      intermediary field_26737 Lnet/minecraft/class_5505;field_26737:Lnet/minecraft/class_5321;
      named registryKey Lnet/minecraft/util/dynamic/RegistryLookupCodec;registryKey:Lnet/minecraft/util/registry/RegistryKey;
  • Constructor Details

    • RegistryLookupCodec

      private RegistryLookupCodec(RegistryKey<? extends Registry<E>> registryKey)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lyc;<init>(Lyg;)V
      intermediary <init> Lnet/minecraft/class_5505;<init>(Lnet/minecraft/class_5321;)V
      named <init> Lnet/minecraft/util/dynamic/RegistryLookupCodec;<init>(Lnet/minecraft/util/registry/RegistryKey;)V
  • Method Details

    • of

      public static <E> RegistryLookupCodec<E> of(RegistryKey<? extends Registry<E>> registryKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lyc;a(Lyg;)Lyc;
      intermediary method_31148 Lnet/minecraft/class_5505;method_31148(Lnet/minecraft/class_5321;)Lnet/minecraft/class_5505;
      named of Lnet/minecraft/util/dynamic/RegistryLookupCodec;of(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/dynamic/RegistryLookupCodec;
    • encode

      public <T> com.mojang.serialization.RecordBuilder<T> encode(Registry<E> registry, com.mojang.serialization.DynamicOps<T> dynamicOps, com.mojang.serialization.RecordBuilder<T> recordBuilder)
      Mappings:
      Namespace Name Mixin selector
      official a Lyc;a(Lgx;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/RecordBuilder;)Lcom/mojang/serialization/RecordBuilder;
      intermediary method_31147 Lnet/minecraft/class_5505;method_31147(Lnet/minecraft/class_2378;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/RecordBuilder;)Lcom/mojang/serialization/RecordBuilder;
      named encode Lnet/minecraft/util/dynamic/RegistryLookupCodec;encode(Lnet/minecraft/util/registry/Registry;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/RecordBuilder;)Lcom/mojang/serialization/RecordBuilder;
    • decode

      public <T> com.mojang.serialization.DataResult<Registry<E>> decode(com.mojang.serialization.DynamicOps<T> dynamicOps, com.mojang.serialization.MapLike<T> mapLike)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • keys

      public <T> Stream<T> keys(com.mojang.serialization.DynamicOps<T> dynamicOps)
      Specified by:
      keys in interface com.mojang.serialization.Keyable
      Specified by:
      keys in class com.mojang.serialization.MapCodec<Registry<E>>