Package com.mojang.serialization.codecs
Class RecordCodecBuilder<O,F>
java.lang.Object
com.mojang.serialization.codecs.RecordCodecBuilder<O,F>
- All Implemented Interfaces:
App<RecordCodecBuilder.Mu<O>,
F>
public final class RecordCodecBuilder<O,F>
extends Object
implements App<RecordCodecBuilder.Mu<O>,F>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <O> MapCodec<O>
build
(App<RecordCodecBuilder.Mu<O>, O> builderBox) static <O> Codec<O>
create
(Function<RecordCodecBuilder.Instance<O>, ? extends App<RecordCodecBuilder.Mu<O>, O>> builder) <E> RecordCodecBuilder<O,
E> dependent
(Function<O, E> getter, MapEncoder<E> encoder, Function<? super F, ? extends MapDecoder<E>> decoderGetter) static <O,
F> RecordCodecBuilder<O, F> deprecated
(F instance, int since) static <O> RecordCodecBuilder.Instance<O>
instance()
static <O> MapCodec<O>
mapCodec
(Function<RecordCodecBuilder.Instance<O>, ? extends App<RecordCodecBuilder.Mu<O>, O>> builder) static <O,
F> RecordCodecBuilder<O, F> static <O,
F> RecordCodecBuilder<O, F> static <O,
F> RecordCodecBuilder<O, F> point
(F instance) static <O,
F> RecordCodecBuilder<O, F> static <O,
F> RecordCodecBuilder<O, F> stable
(F instance) static <O,
F> RecordCodecBuilder<O, F> unbox
(App<RecordCodecBuilder.Mu<O>, F> box)
-
Method Details
-
unbox
-
instance
-
of
public static <O,F> RecordCodecBuilder<O,F> of(Function<O, F> getter, String name, Codec<F> fieldCodec) -
of
-
point
-
stable
-
deprecated
-
point
-
create
public static <O> Codec<O> create(Function<RecordCodecBuilder.Instance<O>, ? extends App<RecordCodecBuilder.Mu<O>, O>> builder) -
mapCodec
public static <O> MapCodec<O> mapCodec(Function<RecordCodecBuilder.Instance<O>, ? extends App<RecordCodecBuilder.Mu<O>, O>> builder) -
dependent
public <E> RecordCodecBuilder<O,E> dependent(Function<O, E> getter, MapEncoder<E> encoder, Function<? super F, ? extends MapDecoder<E>> decoderGetter) -
build
-