Class StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>

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

public static class StringRepresentable.StringRepresentableCodec<S extends StringRepresentable> extends Object implements com.mojang.serialization.Codec<S>
  • 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 com.mojang.serialization.Codec<S>
     

    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
    StringRepresentableCodec(S[] p_309730_, Function<String,S> p_311107_, ToIntFunction<S> p_312549_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<S,T>>
    decode(com.mojang.serialization.DynamicOps<T> p_310491_, T p_312317_)
     
    <T> com.mojang.serialization.DataResult<T>
    encode(S p_312413_, com.mojang.serialization.DynamicOps<T> p_310685_, T p_312430_)
     

    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, 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

  • Constructor Details

  • Method Details

    • decode

      public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<S,T>> decode(com.mojang.serialization.DynamicOps<T> p_310491_, T p_312317_)
      Specified by:
      decode in interface com.mojang.serialization.Decoder<S extends StringRepresentable>
    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(S p_312413_, com.mojang.serialization.DynamicOps<T> p_310685_, T p_312430_)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<S extends StringRepresentable>