Package net.minecraft.util
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 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
ConstructorDescriptionStringRepresentableCodec
(S[] p_304774_, Function<String, S> p_304834_, ToIntFunction<S> p_304925_) -
Method Summary
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
-
codec
-
-
Constructor Details
-
StringRepresentableCodec
-
-
Method Details
-
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<S,T>> decode(com.mojang.serialization.DynamicOps<T> p_304586_, T p_304692_) - Specified by:
decode
in interfacecom.mojang.serialization.Decoder<S extends StringRepresentable>
-
encode
public <T> com.mojang.serialization.DataResult<T> encode(S p_304936_, com.mojang.serialization.DynamicOps<T> p_304952_, T p_304437_) - Specified by:
encode
in interfacecom.mojang.serialization.Encoder<S extends StringRepresentable>
-