Class StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
java.lang.Object
net.minecraft.util.StringRepresentable.StringRepresentableCodec<S>
- Direct Known Subclasses:
StringRepresentable.EnumCodec
- Enclosing interface:
StringRepresentable
public static class StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
extends Object
implements Codec<S>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Codec
Codec.RecursiveCodec<T>, Codec.ResultFunction<A>Nested classes/interfaces inherited from interface Decoder
Decoder.Boxed<A>, Decoder.Simple<A>, Decoder.Terminal<A> -
Field Summary
FieldsFields inherited from interface Codec
BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING -
Constructor Summary
ConstructorsConstructorDescriptionStringRepresentableCodec(S[] valueArray, Function<String, @Nullable S> nameResolver, ToIntFunction<S> idResolver) -
Method Summary
Modifier and TypeMethodDescription<T> DataResult<Pair<S, T>> decode(DynamicOps<T> ops, T input) <T> DataResult<T> encode(S input, DynamicOps<T> ops, T prefix) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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, withAlternative, withAlternative, withLifecycle, xmapMethods inherited from interface Decoder
boxed, decode, flatMap, map, parse, parse, simple, terminalMethods inherited from interface Encoder
comap, encodeStart, flatComap
-
Field Details
-
codec
-
-
Constructor Details
-
StringRepresentableCodec
-
-
Method Details
-
decode
- Specified by:
decodein interfaceDecoder<S extends StringRepresentable>
-
encode
- Specified by:
encodein interfaceEncoder<S extends StringRepresentable>
-