Class RegistryFixedCodec<E>

java.lang.Object
net.minecraft.registry.entry.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
named net/minecraft/registry/entry/RegistryFixedCodec
intermediary net/minecraft/class_6899
official alc
  • Nested Class Summary

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

    com.mojang.serialization.Codec.RecursiveCodec<T>, com.mojang.serialization.Codec.ResultFunction<A>

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

    com.mojang.serialization.Decoder.Boxed<A>, com.mojang.serialization.Decoder.Simple<A>, com.mojang.serialization.Decoder.Terminal<A>
  • 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, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, listOf, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, sizeLimitedListOf, stable, validate, 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
      named registry Lnet/minecraft/registry/entry/RegistryFixedCodec;registry:Lnet/minecraft/registry/RegistryKey;
      intermediary field_36484 Lnet/minecraft/class_6899;field_36484:Lnet/minecraft/class_5321;
      official a Lalc;a:Lale;
  • Constructor Details

    • RegistryFixedCodec

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

    • of

      public static <E> RegistryFixedCodec<E> of(RegistryKey<? extends Registry<E>> registry)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/registry/entry/RegistryFixedCodec;of(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/registry/entry/RegistryFixedCodec;
      intermediary method_40400 Lnet/minecraft/class_6899;method_40400(Lnet/minecraft/class_5321;)Lnet/minecraft/class_6899;
      official a Lalc;a(Lale;)Lalc;
    • 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
      named encode Lnet/minecraft/registry/entry/RegistryFixedCodec;encode(Lnet/minecraft/registry/entry/RegistryEntry;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;
      official a Lalc;a(Lji;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
      named decode Lnet/minecraft/registry/entry/RegistryFixedCodec;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;
      official decode Lalc;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • toString

      public String toString()
      Overrides:
      toString in class Object