Class RegistryFixedCodec<E>

java.lang.Object
net.minecraft.util.registry.RegistryFixedCodec<E>
All Implemented Interfaces:
com.mojang.serialization.Codec<RegistryEntry<E>>, com.mojang.serialization.Decoder<RegistryEntry<E>>, com.mojang.serialization.Encoder<RegistryEntry<E>>

public final class RegistryFixedCodec<E> extends Object implements com.mojang.serialization.Codec<RegistryEntry<E>>
Mappings:
Namespace Name
official aae
intermediary net/minecraft/class_6899
named net/minecraft/util/registry/RegistryFixedCodec
  • Nested Class Summary

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

    com.mojang.serialization.Codec.ResultFunction<A extends Object>

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

    com.mojang.serialization.Decoder.Boxed<A extends Object>, com.mojang.serialization.Decoder.Simple<A extends Object>, com.mojang.serialization.Decoder.Terminal<A extends Object>
  • Field Summary

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

    Fields inherited from interface com.mojang.serialization.Codec

    BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntry<E>,T>>
    decode(com.mojang.serialization.DynamicOps<T> ops, T input)
     
    <T> com.mojang.serialization.DataResult<T>
    encode(RegistryEntry<E> registryEntry, com.mojang.serialization.DynamicOps<T> dynamicOps, T t)
     
    static <E> RegistryFixedCodec<E>
    of(RegistryKey<? extends Registry<E>> registry)
     
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.mojang.serialization.Codec

    comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, stable, withLifecycle, xmap

    Methods inherited from interface com.mojang.serialization.Decoder

    boxed, decode, flatMap, map, parse, parse, simple, terminal

    Methods inherited from interface com.mojang.serialization.Encoder

    comap, encodeStart, flatComap
  • Field Details

    • registry

      private final RegistryKey<? extends Registry<E>> registry
      Mappings:
      Namespace Name Mixin selector
      official a Laae;a:Laai;
      intermediary field_36484 Lnet/minecraft/class_6899;field_36484:Lnet/minecraft/class_5321;
      named registry Lnet/minecraft/util/registry/RegistryFixedCodec;registry:Lnet/minecraft/util/registry/RegistryKey;
  • Constructor Details

    • RegistryFixedCodec

      private RegistryFixedCodec(RegistryKey<? extends Registry<E>> registry)
      Mappings:
      Namespace Name Mixin selector
      official <init> Laae;<init>(Laai;)V
      intermediary <init> Lnet/minecraft/class_6899;<init>(Lnet/minecraft/class_5321;)V
      named <init> Lnet/minecraft/util/registry/RegistryFixedCodec;<init>(Lnet/minecraft/util/registry/RegistryKey;)V
  • Method Details

    • of

      public static <E> RegistryFixedCodec<E> of(RegistryKey<? extends Registry<E>> registry)
      Mappings:
      Namespace Name Mixin selector
      official a Laae;a(Laai;)Laae;
      intermediary method_40400 Lnet/minecraft/class_6899;method_40400(Lnet/minecraft/class_5321;)Lnet/minecraft/class_6899;
      named of Lnet/minecraft/util/registry/RegistryFixedCodec;of(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/registry/RegistryFixedCodec;
    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(RegistryEntry<E> registryEntry, com.mojang.serialization.DynamicOps<T> dynamicOps, T t)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<E>
      Mappings:
      Namespace Name Mixin selector
      official a Laae;a(Lhc;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary method_40396 Lnet/minecraft/class_6899;method_40396(Lnet/minecraft/class_6880;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named encode Lnet/minecraft/util/registry/RegistryFixedCodec;encode(Lnet/minecraft/util/registry/RegistryEntry;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • decode

      public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<RegistryEntry<E>,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input)
      Specified by:
      decode in interface com.mojang.serialization.Decoder<E>
      Mappings:
      Namespace Name Mixin selector
      official decode Laae;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary decode Lnet/minecraft/class_6899;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named decode Lnet/minecraft/util/registry/RegistryFixedCodec;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • toString

      public String toString()
      Overrides:
      toString in class Object