Interface Decoder<A>
- All Known Subinterfaces:
Codec<A>, PrimitiveCodec<A>
- All Known Implementing Classes:
Codec.RecursiveCodec, CompoundListCodec, ConditionalOps.ConditionalDecoder, DispatchedMapCodec, EitherCodec, ExtraCodecs.StrictUnboundedMapCodec, HolderSetCodec, LenientUnboundedMapCodec, ListCodec, MapCodec.MapCodecCodec, NeoForgeExtraCodecs.AlternativeCodec, PairCodec, RegistryFileCodec, RegistryFixedCodec, StringRepresentable.EnumCodec, StringRepresentable.StringRepresentableCodec, UnboundedMapCodec, XorCodec
public interface Decoder<A>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptiondefault Decoder.Boxed<A> boxed()default <T> DataResult<Pair<A, T>> <T> DataResult<Pair<A, T>> decode(DynamicOps<T> ops, T input) static <A> Decoder<A> default MapDecoder<A> default <B> Decoder<B> flatMap(Function<? super A, ? extends DataResult<? extends B>> function) default <B> Decoder<B> static <A> Decoder<A> ofBoxed(Decoder.Boxed<? extends A> boxed) static <A> Decoder<A> ofSimple(Decoder.Simple<? extends A> simple) static <A> Decoder<A> ofTerminal(Decoder.Terminal<? extends A> terminal) default <T> DataResult<A> default <T> DataResult<A> parse(DynamicOps<T> ops, T input) promotePartial(Consumer<String> onError) default Decoder.Simple<A> simple()default Decoder.Terminal<A> terminal()static <A> MapDecoder<A> unit(A instance) static <A> MapDecoder<A> withLifecycle(Lifecycle lifecycle)
-
Method Details
-
decode
-
parse
-
decode
-
parse
-
terminal
-
boxed
-
simple
-
fieldOf
-
flatMap
-
map
-
promotePartial
-
withLifecycle
-
ofTerminal
-
ofBoxed
-
ofSimple
-
unit
-
unit
-
error
-