Class RegistryLookupCodec<E>

java.lang.Object
com.mojang.serialization.CompressorHolder
com.mojang.serialization.MapCodec<Registry<E>>
net.minecraft.resources.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>>
  • 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 ResourceKey<? extends Registry<E>>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    RegistryLookupCodec​(ResourceKey<? extends Registry<E>> p_135617_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E> RegistryLookupCodec<E>
    create​(ResourceKey<? extends Registry<E>> p_135623_)
     
    <T> com.mojang.serialization.DataResult<Registry<E>>
    decode​(com.mojang.serialization.DynamicOps<T> p_135625_, com.mojang.serialization.MapLike<T> p_135626_)
     
    <T> com.mojang.serialization.RecordBuilder<T>
    encode​(Registry<E> p_135619_, com.mojang.serialization.DynamicOps<T> p_135620_, com.mojang.serialization.RecordBuilder<T> p_135621_)
     
    <T> Stream<T>
    keys​(com.mojang.serialization.DynamicOps<T> p_135632_)
     
     

    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

  • Constructor Details

    • RegistryLookupCodec

      private RegistryLookupCodec(ResourceKey<? extends Registry<E>> p_135617_)
  • Method Details

    • create

      public static <E> RegistryLookupCodec<E> create(ResourceKey<? extends Registry<E>> p_135623_)
    • encode

      public <T> com.mojang.serialization.RecordBuilder<T> encode(Registry<E> p_135619_, com.mojang.serialization.DynamicOps<T> p_135620_, com.mojang.serialization.RecordBuilder<T> p_135621_)
    • decode

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

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

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