Class StringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable>

java.lang.Object
net.minecraft.util.StringIdentifiable.Codec<E>
All Implemented Interfaces:
com.mojang.serialization.Codec<E>, com.mojang.serialization.Decoder<E>, com.mojang.serialization.Encoder<E>
Enclosing interface:
StringIdentifiable

@Deprecated public static class StringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable> extends Object implements com.mojang.serialization.Codec<E>
Deprecated.
Mappings:
Namespace Name
official apr$a
intermediary net/minecraft/class_3542$class_7292
named net/minecraft/util/StringIdentifiable$Codec
  • Nested Class Summary

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

    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 com.mojang.serialization.Codec<E>
    Deprecated.
     
    private final Function<String,E>
    Deprecated.
     

    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
    Constructor
    Description
    Codec(E[] values, Function<String,E> idToIdentifiable)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
     
    byId(@Nullable String id, E fallback)
    Deprecated.
     
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<E,T>>
    decode(com.mojang.serialization.DynamicOps<T> ops, T input)
    Deprecated.
     
    <T> com.mojang.serialization.DataResult<T>
    encode(E e, com.mojang.serialization.DynamicOps<T> dynamicOps, T t)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

    • base

      private final com.mojang.serialization.Codec<E extends Enum<E> & StringIdentifiable> base
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official a Lapr$a;a:Lcom/mojang/serialization/Codec;
      intermediary field_38378 Lnet/minecraft/class_3542$class_7292;field_38378:Lcom/mojang/serialization/Codec;
      named base Lnet/minecraft/util/StringIdentifiable$Codec;base:Lcom/mojang/serialization/Codec;
    • idToIdentifiable

      private final Function<String,E extends Enum<E> & StringIdentifiable> idToIdentifiable
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official b Lapr$a;b:Ljava/util/function/Function;
      intermediary field_38379 Lnet/minecraft/class_3542$class_7292;field_38379:Ljava/util/function/Function;
      named idToIdentifiable Lnet/minecraft/util/StringIdentifiable$Codec;idToIdentifiable:Ljava/util/function/Function;
  • Constructor Details

    • Codec

      public Codec(E[] values, Function<String,E> idToIdentifiable)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official <init> Lapr$a;<init>([Ljava/lang/Enum;Ljava/util/function/Function;)V
      intermediary <init> Lnet/minecraft/class_3542$class_7292;<init>([Ljava/lang/Enum;Ljava/util/function/Function;)V
      named <init> Lnet/minecraft/util/StringIdentifiable$Codec;<init>([Ljava/lang/Enum;Ljava/util/function/Function;)V
  • Method Details

    • decode

      public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<E,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input)
      Deprecated.
      Specified by:
      decode in interface com.mojang.serialization.Decoder<E extends Enum<E> & StringIdentifiable>
      Mappings:
      Namespace Name Mixin selector
      official decode Lapr$a;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary decode Lnet/minecraft/class_3542$class_7292;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named decode Lnet/minecraft/util/StringIdentifiable$Codec;decode(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(E e, com.mojang.serialization.DynamicOps<T> dynamicOps, T t)
      Deprecated.
      Specified by:
      encode in interface com.mojang.serialization.Encoder<E extends Enum<E> & StringIdentifiable>
      Mappings:
      Namespace Name Mixin selector
      official a Lapr$a;a(Ljava/lang/Enum;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary method_42631 Lnet/minecraft/class_3542$class_7292;method_42631(Ljava/lang/Enum;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named encode Lnet/minecraft/util/StringIdentifiable$Codec;encode(Ljava/lang/Enum;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • byId

      @Nullable public E byId(@Nullable @Nullable String id)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official a Lapr$a;a(Ljava/lang/String;)Ljava/lang/Enum;
      intermediary method_42633 Lnet/minecraft/class_3542$class_7292;method_42633(Ljava/lang/String;)Ljava/lang/Enum;
      named byId Lnet/minecraft/util/StringIdentifiable$Codec;byId(Ljava/lang/String;)Ljava/lang/Enum;
    • byId

      public E byId(@Nullable @Nullable String id, E fallback)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official a Lapr$a;a(Ljava/lang/String;Ljava/lang/Enum;)Ljava/lang/Enum;
      intermediary method_47920 Lnet/minecraft/class_3542$class_7292;method_47920(Ljava/lang/String;Ljava/lang/Enum;)Ljava/lang/Enum;
      named byId Lnet/minecraft/util/StringIdentifiable$Codec;byId(Ljava/lang/String;Ljava/lang/Enum;)Ljava/lang/Enum;