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

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

@Deprecated public static class StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable> extends Object implements com.mojang.serialization.Codec<E>
Deprecated.
  • 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 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[] p_216447_, Function<String,E> p_216448_)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byName(String p_216456_)
    Deprecated.
     
    byName(String p_263077_, E p_263115_)
    Deprecated.
     
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<E,T>>
    decode(com.mojang.serialization.DynamicOps<T> p_216463_, T p_216464_)
    Deprecated.
     
    <T> com.mojang.serialization.DataResult<T>
    encode(E p_216450_, com.mojang.serialization.DynamicOps<T> p_216451_, T p_216452_)
    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

  • Constructor Details

    • EnumCodec

      public EnumCodec(E[] p_216447_, Function<String,E> p_216448_)
      Deprecated.
  • Method Details

    • decode

      public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<E,T>> decode(com.mojang.serialization.DynamicOps<T> p_216463_, T p_216464_)
      Deprecated.
      Specified by:
      decode in interface com.mojang.serialization.Decoder<E extends Enum<E> & StringRepresentable>
    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(E p_216450_, com.mojang.serialization.DynamicOps<T> p_216451_, T p_216452_)
      Deprecated.
      Specified by:
      encode in interface com.mojang.serialization.Encoder<E extends Enum<E> & StringRepresentable>
    • byName

      @Nullable public E byName(@Nullable String p_216456_)
      Deprecated.
    • byName

      public E byName(@Nullable String p_263077_, E p_263115_)
      Deprecated.