net.minecraft.util

public class ExtraCodecs

alq
net.minecraft.util.ExtraCodecs
net.minecraft.class_5699
net.minecraft.util.dynamic.Codecs
net.minecraft.src.C_140989_
net.minecraft.util.ExtraCodecs

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<UUID>
a
UUID
field_38081
UUID
f_216157_
public static final com.mojang.serialization.Codec<Integer>
b
NON_NEGATIVE_INT
field_33441
NONNEGATIVE_INT
f_144628_
public static final com.mojang.serialization.Codec<Integer>
c
POSITIVE_INT
field_33442
POSITIVE_INT
f_144629_
public static final com.mojang.serialization.Codec<Float>
d
POSITIVE_FLOAT
field_34387
POSITIVE_FLOAT
f_184349_
public static final com.mojang.serialization.Codec<Pattern>
e
PATTERN
field_37408
REGULAR_EXPRESSION
f_216158_
public static final com.mojang.serialization.Codec<Instant>
f
INSTANT_ISO8601
field_39042
INSTANT
f_216159_
public static final com.mojang.serialization.Codec<byte[]>
g
BASE64_STRING
field_39273
BASE_64
f_216160_
public static final com.mojang.serialization.Codec<ExtraCodecs$TagOrElementLocation>
h
TAG_OR_ELEMENT_ID
field_39274
TAG_ENTRY_ID
f_216161_
public static final Function<Optional<Long>, OptionalLong>
i
toOptionalLong
field_39395
OPTIONAL_OF_LONG_TO_OPTIONAL_LONG
f_216162_
public static final Function<OptionalLong, Optional<Long>>
j
fromOptionalLong
field_39396
OPTIONAL_LONG_TO_OPTIONAL_OF_LONG
f_216163_

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static <F, S> com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<F, S>>
a(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
xor(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
method_33817(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
xor(com.mojang.serialization.Codec<F> first, com.mojang.serialization.Codec<S> second)
m_144639_(com.mojang.serialization.Codec<F> p_144640_, com.mojang.serialization.Codec<S> p_144641_)
public static <P, I> com.mojang.serialization.Codec<I>
a(com.mojang.serialization.Codec<P> arg0, String arg1, String arg2, BiFunction<P, P, com.mojang.serialization.DataResult<I>> arg3, Function<I, P> arg4, Function<I, P> arg5)
intervalCodec(com.mojang.serialization.Codec<P> arg0, String arg1, String arg2, BiFunction<P, P, com.mojang.serialization.DataResult<I>> arg3, Function<I, P> arg4, Function<I, P> arg5)
method_37931(com.mojang.serialization.Codec<P> arg0, String arg1, String arg2, BiFunction<P, P, com.mojang.serialization.DataResult<I>> arg3, Function<I, P> arg4, Function<I, P> arg5)
createCodecForPairObject(com.mojang.serialization.Codec<P> codec, String leftFieldName, String rightFieldName, BiFunction<P, P, com.mojang.serialization.DataResult<I>> combineFunction, Function<I, P> leftFunction, Function<I, P> rightFunction)
m_184361_(com.mojang.serialization.Codec<P> p_184362_, String p_184363_, String p_184364_, BiFunction<P, P, com.mojang.serialization.DataResult<I>> p_184365_, Function<I, P> p_184366_, Function<I, P> p_184367_)
public static <A> com.mojang.serialization.Codec$ResultFunction<A>
a(A arg0)
orElsePartial(A arg0)
method_39028(A arg0)
orElsePartial(A object)
m_184381_(A p_184382_)
public static <E> com.mojang.serialization.Codec<E>
a(ToIntFunction<E> arg0, IntFunction<E> arg1, int arg2)
idResolverCodec(ToIntFunction<E> arg0, IntFunction<E> arg1, int arg2)
method_39511(ToIntFunction<E> arg0, IntFunction<E> arg1, int arg2)
rawIdChecked(ToIntFunction<E> elementToRawId, IntFunction<E> rawIdToElement, int errorRawId)
m_184421_(ToIntFunction<E> p_184422_, IntFunction<E> p_184423_, int p_184424_)
public static <E> com.mojang.serialization.Codec<E>
a(Function<E, String> arg0, Function<String, E> arg1)
stringResolverCodec(Function<E, String> arg0, Function<String, E> arg1)
method_39508(Function<E, String> arg0, Function<String, E> arg1)
idChecked(Function<E, String> elementToId, Function<String, E> idToElement)
m_184405_(Function<E, String> p_184406_, Function<String, E> p_184407_)
public static <E> com.mojang.serialization.Codec<E>
b(com.mojang.serialization.Codec<E> arg0, com.mojang.serialization.Codec<E> arg1)
orCompressed(com.mojang.serialization.Codec<E> arg0, com.mojang.serialization.Codec<E> arg1)
method_39512(com.mojang.serialization.Codec<E> arg0, com.mojang.serialization.Codec<E> arg1)
orCompressed(com.mojang.serialization.Codec<E> uncompressedCodec, com.mojang.serialization.Codec<E> compressedCodec)
m_184425_(com.mojang.serialization.Codec<E> p_184426_, com.mojang.serialization.Codec<E> p_184427_)
public static <E> com.mojang.serialization.Codec<E>
a(com.mojang.serialization.Codec<E> arg0, Function<E, com.mojang.serialization.Lifecycle> arg1, Function<E, com.mojang.serialization.Lifecycle> arg2)
overrideLifecycle(com.mojang.serialization.Codec<E> arg0, Function<E, com.mojang.serialization.Lifecycle> arg1, Function<E, com.mojang.serialization.Lifecycle> arg2)
method_39504(com.mojang.serialization.Codec<E> arg0, Function<E, com.mojang.serialization.Lifecycle> arg1, Function<E, com.mojang.serialization.Lifecycle> arg2)
withLifecycle(com.mojang.serialization.Codec<E> originalCodec, Function<E, com.mojang.serialization.Lifecycle> entryLifecycleGetter, Function<E, com.mojang.serialization.Lifecycle> lifecycleGetter)
m_184368_(com.mojang.serialization.Codec<E> p_184369_, Function<E, com.mojang.serialization.Lifecycle> p_184370_, Function<E, com.mojang.serialization.Lifecycle> p_184371_)
private static <N extends Number extends Comparable<N>> Function<N, com.mojang.serialization.DataResult<N>>
a(N arg0, N arg1, Function<N, String> arg2)
checkRangeWithMessage(N arg0, N arg1, Function<N, String> arg2)
method_36243(N arg0, N arg1, Function<N, String> arg2)
createIntRangeChecker(N min, N max, Function<N, String> messageFactory)
m_144644_(N p_144645_, N p_144646_, Function<N, String> p_144647_)
private static com.mojang.serialization.Codec<Integer>
a(int arg0, int arg1, Function<Integer, String> arg2)
intRangeWithMessage(int arg0, int arg1, Function<Integer, String> arg2)
method_36241(int arg0, int arg1, Function<Integer, String> arg2)
rangedInt(int min, int max, Function<Integer, String> messageFactory)
m_144633_(int p_144634_, int p_144635_, Function<Integer, String> p_144636_)
private static <N extends Number extends Comparable<N>> Function<N, com.mojang.serialization.DataResult<N>>
b(N arg0, N arg1, Function<N, String> arg2)
checkRangeMinExclusiveWithMessage(N arg0, N arg1, Function<N, String> arg2)
method_37940(N arg0, N arg1, Function<N, String> arg2)
createFloatRangeChecker(N min, N max, Function<N, String> messageFactory)
m_184430_(N p_184431_, N p_184432_, Function<N, String> p_184433_)
private static com.mojang.serialization.Codec<Float>
a(float arg0, float arg1, Function<Float, String> arg2)
floatRangeMinExclusiveWithMessage(float arg0, float arg1, Function<Float, String> arg2)
method_37928(float arg0, float arg1, Function<Float, String> arg2)
rangedFloat(float min, float max, Function<Float, String> messageFactory)
m_184350_(float p_184351_, float p_184352_, Function<Float, String> p_184353_)
public static <T> Function<List<T>, com.mojang.serialization.DataResult<List<T>>>
a()
nonEmptyListCheck()
method_36240()
createNonEmptyListChecker()
m_144632_()
public static <T> com.mojang.serialization.Codec<List<T>>
a(com.mojang.serialization.Codec<List<T>> arg0)
nonEmptyList(com.mojang.serialization.Codec<List<T>> arg0)
method_36973(com.mojang.serialization.Codec<List<T>> arg0)
nonEmptyList(com.mojang.serialization.Codec<List<T>> originalCodec)
m_144637_(com.mojang.serialization.Codec<List<T>> p_144638_)
public static <T> Function<HolderSet<T>, com.mojang.serialization.DataResult<HolderSet<T>>>
b()
nonEmptyHolderSetCheck()
method_40112()
createNonEmptyEntryListChecker()
m_203981_()
public static <T> com.mojang.serialization.Codec<HolderSet<T>>
b(com.mojang.serialization.Codec<he<T>> arg0)
nonEmptyHolderSet(com.mojang.serialization.Codec<HolderSet<T>> arg0)
method_40113(com.mojang.serialization.Codec<class_6885<T>> arg0)
nonEmptyEntryList(com.mojang.serialization.Codec<RegistryEntryList<T>> originalCodec)
m_203982_(com.mojang.serialization.Codec<C_203233_<T>> p_203983_)
public static <A> com.mojang.serialization.Codec<A>
a(Supplier<com.mojang.serialization.Codec<A>> arg0)
lazyInitializedCodec(Supplier<com.mojang.serialization.Codec<A>> arg0)
method_39240(Supplier<com.mojang.serialization.Codec<A>> arg0)
createLazy(Supplier<com.mojang.serialization.Codec<A>> supplier)
m_184415_(Supplier<com.mojang.serialization.Codec<A>> p_184416_)
public static <E> com.mojang.serialization.MapCodec<E>
a(Function<com.mojang.serialization.DynamicOps<?>, com.mojang.serialization.DataResult<E>> arg0)
retrieveContext(Function<com.mojang.serialization.DynamicOps<?>, com.mojang.serialization.DataResult<E>> arg0)
method_40110(Function<com.mojang.serialization.DynamicOps<?>, com.mojang.serialization.DataResult<E>> arg0)
createContextRetrievalCodec(Function<com.mojang.serialization.DynamicOps<?>, com.mojang.serialization.DataResult<E>> retriever)
m_203976_(Function<com.mojang.serialization.DynamicOps<?>, com.mojang.serialization.DataResult<E>> p_203977_)
public static <E, L extends Collection<E>, T> Function<L, com.mojang.serialization.DataResult<L>>
b(Function<E, T> arg0)
ensureHomogenous(Function<E, T> arg0)
method_40114(Function<E, T> arg0)
createEqualTypeChecker(Function<E, T> typeGetter)
m_203984_(Function<E, T> p_203985_)
public static <A> com.mojang.serialization.Codec<A>
c(com.mojang.serialization.Codec<A> arg0)
catchDecoderException(com.mojang.serialization.Codec<A> arg0)
method_42114(com.mojang.serialization.Codec<A> arg0)
exceptionCatching(com.mojang.serialization.Codec<A> codec)
m_216185_(com.mojang.serialization.Codec<A> p_216186_)
public static com.mojang.serialization.Codec<Instant>
a(DateTimeFormatter arg0)
instantCodec(DateTimeFormatter arg0)
method_43532(DateTimeFormatter arg0)
instant(DateTimeFormatter formatter)
m_216170_(DateTimeFormatter p_216171_)
public static com.mojang.serialization.MapCodec<OptionalLong>
a(com.mojang.serialization.MapCodec<Optional<Long>> arg0)
asOptionalLong(com.mojang.serialization.MapCodec<Optional<Long>> arg0)
method_44167(com.mojang.serialization.MapCodec<Optional<Long>> arg0)
optionalLong(com.mojang.serialization.MapCodec<Optional<Long>> codec)
m_216166_(com.mojang.serialization.MapCodec<Optional<Long>> p_216167_)