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

java.lang.Object
net.minecraft.util.StringIdentifiable.EnumCodec<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.EnumCodec<E extends Enum<E> & StringIdentifiable> extends Object implements com.mojang.serialization.Codec<E>
Deprecated.
Mappings:
Namespace Name
official asp$a
intermediary net/minecraft/class_3542$class_7292
named net/minecraft/util/StringIdentifiable$EnumCodec
  • 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
    EnumCodec(E[] values, Function<String,E> idToIdentifiable)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byId(@Nullable String id)
    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 Lasp$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$EnumCodec;base:Lcom/mojang/serialization/Codec;
    • idToIdentifiable

      private final Function<String,E extends Enum<E> & StringIdentifiable> idToIdentifiable
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official b Lasp$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$EnumCodec;idToIdentifiable:Ljava/util/function/Function;
  • Constructor Details

    • EnumCodec

      public EnumCodec(E[] values, Function<String,E> idToIdentifiable)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official <init> Lasp$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$EnumCodec;<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 Lasp$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$EnumCodec;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 Lasp$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$EnumCodec;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 Lasp$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$EnumCodec;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 Lasp$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$EnumCodec;byId(Ljava/lang/String;Ljava/lang/Enum;)Ljava/lang/Enum;