net.minecraft.util

public class ExtraCodecs

arf
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<com.google.gson.JsonElement>
a
JSON
field_40721
JSON_ELEMENT
f_252400_
public static final com.mojang.serialization.Codec<Component>
b
COMPONENT
field_40722
TEXT
f_252442_
public static final com.mojang.serialization.Codec<Component>
c
FLAT_COMPONENT
field_43173
STRINGIFIED_TEXT
f_276686_
public static final com.mojang.serialization.Codec<org.joml.Vector3f>
d
VECTOR3F
field_40723
VECTOR_3F
f_252432_
public static final com.mojang.serialization.Codec<org.joml.Quaternionf>
e
QUATERNIONF_COMPONENTS
field_42265
QUATERNIONF
f_268572_
public static final com.mojang.serialization.Codec<org.joml.AxisAngle4f>
f
AXISANGLE4F
field_42266
AXIS_ANGLE4F
f_268751_
public static final com.mojang.serialization.Codec<org.joml.Quaternionf>
g
QUATERNIONF
field_42267
ROTATION
f_268538_
public static com.mojang.serialization.Codec<org.joml.Matrix4f>
h
MATRIX4F
field_42268
MATRIX4F
f_268748_
public static final com.mojang.serialization.Codec<Integer>
i
NON_NEGATIVE_INT
field_33441
NONNEGATIVE_INT
f_144628_
public static final com.mojang.serialization.Codec<Integer>
j
POSITIVE_INT
field_33442
POSITIVE_INT
f_144629_
public static final com.mojang.serialization.Codec<Float>
k
POSITIVE_FLOAT
field_34387
POSITIVE_FLOAT
f_184349_
public static final com.mojang.serialization.Codec<Pattern>
l
PATTERN
field_37408
REGULAR_EXPRESSION
f_216158_
public static final com.mojang.serialization.Codec<Instant>
m
INSTANT_ISO8601
field_39042
INSTANT
f_216159_
public static final com.mojang.serialization.Codec<byte[]>
n
BASE64_STRING
field_39273
BASE_64
f_216160_
public static final com.mojang.serialization.Codec<String>
o
ESCAPED_STRING
field_46165
ESCAPED_STRING
f_291683_
public static final com.mojang.serialization.Codec<ExtraCodecs$TagOrElementLocation>
p
TAG_OR_ELEMENT_ID
field_39274
TAG_ENTRY_ID
f_216161_
public static final Function<Optional<Long>, OptionalLong>
q
toOptionalLong
field_39395
OPTIONAL_OF_LONG_TO_OPTIONAL_LONG
f_216162_
public static final Function<OptionalLong, Optional<Long>>
r
fromOptionalLong
field_39396
OPTIONAL_LONG_TO_OPTIONAL_OF_LONG
f_216163_
public static final com.mojang.serialization.Codec<BitSet>
s
BIT_SET
field_40724
BIT_SET
f_252419_
private static final com.mojang.serialization.Codec<com.mojang.authlib.properties.Property>
y
PROPERTY
field_40727
GAME_PROFILE_PROPERTY
f_252501_
public static final com.mojang.serialization.Codec<com.mojang.authlib.properties.PropertyMap>
t
PROPERTY_MAP
field_40725
GAME_PROFILE_PROPERTY_MAP
f_252500_
private static final com.mojang.serialization.MapCodec<com.mojang.authlib.GameProfile>
z
GAME_PROFILE_WITHOUT_PROPERTIES
field_45076
GAME_PROFILE
f_291490_
public static final com.mojang.serialization.Codec<com.mojang.authlib.GameProfile>
u
GAME_PROFILE
field_40726
GAME_PROFILE_WITH_PROPERTIES
f_252453_
public static final com.mojang.serialization.Codec<String>
v
NON_EMPTY_STRING
field_41759
NON_EMPTY_STRING
f_263723_
public static final com.mojang.serialization.Codec<Integer>
w
CODEPOINT
field_44703
CODEPOINT
f_283896_
public static com.mojang.serialization.Codec<String>
x
RESOURCE_PATH_CODEC
field_45075
IDENTIFIER_PATH
f_291300_

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static <T> com.mojang.serialization.Codec<T>
a(Function<com.google.gson.JsonElement, T> arg0, Function<T, com.google.gson.JsonElement> arg1)
adaptJsonSerializer(Function<com.google.gson.JsonElement, T> arg0, Function<T, com.google.gson.JsonElement> arg1)
method_53054(Function<com.google.gson.JsonElement, T> arg0, Function<T, com.google.gson.JsonElement> arg1)
fromJsonSerializer(Function<com.google.gson.JsonElement, T> deserializer, Function<T, com.google.gson.JsonElement> serializer)
m_293657_(Function<com.google.gson.JsonElement, T> p_301013_, Function<T, com.google.gson.JsonElement> p_297664_)
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>
b(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_)
public static <F, S> ExtraCodecs$EitherCodec<F, S>
c(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
either(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
method_53702(com.mojang.serialization.Codec<F> arg0, com.mojang.serialization.Codec<S> arg1)
either(com.mojang.serialization.Codec<F> first, com.mojang.serialization.Codec<S> second)
m_294448_(com.mojang.serialization.Codec<F> p_298040_, com.mojang.serialization.Codec<S> p_300729_)
public static <K, V> ExtraCodecs$StrictUnboundedMapCodec<K, V>
d(com.mojang.serialization.Codec<K> arg0, com.mojang.serialization.Codec<V> arg1)
strictUnboundedMap(com.mojang.serialization.Codec<K> arg0, com.mojang.serialization.Codec<V> arg1)
method_53703(com.mojang.serialization.Codec<K> arg0, com.mojang.serialization.Codec<V> arg1)
strictUnboundedMap(com.mojang.serialization.Codec<K> keyCodec, com.mojang.serialization.Codec<V> elementCodec)
m_295464_(com.mojang.serialization.Codec<K> p_298880_, com.mojang.serialization.Codec<V> p_297369_)
public static <T> com.mojang.serialization.Codec<T>
a(com.mojang.serialization.Codec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
validate(com.mojang.serialization.Codec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
method_48112(com.mojang.serialization.Codec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
validate(com.mojang.serialization.Codec<T> codec, Function<T, com.mojang.serialization.DataResult<T>> validator)
m_264370_(com.mojang.serialization.Codec<T> p_265690_, Function<T, com.mojang.serialization.DataResult<T>> p_265223_)
public static <T> com.mojang.serialization.MapCodec<T>
a(com.mojang.serialization.MapCodec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
validate(com.mojang.serialization.MapCodec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
method_51699(com.mojang.serialization.MapCodec<T> arg0, Function<T, com.mojang.serialization.DataResult<T>> arg1)
validate(com.mojang.serialization.MapCodec<T> codec, Function<T, com.mojang.serialization.DataResult<T>> validator)
m_285994_(com.mojang.serialization.MapCodec<T> p_286613_, Function<T, com.mojang.serialization.DataResult<T>> p_286875_)
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_)
public static com.mojang.serialization.Codec<Integer>
a(int arg0, int arg1)
intRange(int arg0, int arg1)
method_48766(int arg0, int arg1)
rangedInt(int min, int max)
m_269197_(int p_270883_, int p_270323_)
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> 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> com.mojang.serialization.Codec<HolderSet<T>>
b(com.mojang.serialization.Codec<hi<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 <T> com.mojang.serialization.Codec<T>
a(Function<com.mojang.serialization.Codec<T>, com.mojang.serialization.Codec<T>> arg0)
recursive(Function<com.mojang.serialization.Codec<T>, com.mojang.serialization.Codec<T>> arg0)
method_53052(Function<com.mojang.serialization.Codec<T>, com.mojang.serialization.Codec<T>> arg0)
createRecursive(Function<com.mojang.serialization.Codec<T>, com.mojang.serialization.Codec<T>> codecFunction)
m_293376_(Function<com.mojang.serialization.Codec<T>, com.mojang.serialization.Codec<T>> p_298069_)
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 <A> com.mojang.serialization.MapCodec<Optional<A>>
a(com.mojang.serialization.Codec<A> arg0, String arg1)
strictOptionalField(com.mojang.serialization.Codec<A> arg0, String arg1)
method_53048(com.mojang.serialization.Codec<A> arg0, String arg1)
createStrictOptionalFieldCodec(com.mojang.serialization.Codec<A> codec, String field)
m_294263_(com.mojang.serialization.Codec<A> p_298284_, String p_297262_)
public static <A> com.mojang.serialization.MapCodec<A>
a(com.mojang.serialization.Codec<A> arg0, String arg1, A arg2)
strictOptionalField(com.mojang.serialization.Codec<A> arg0, String arg1, A arg2)
method_53049(com.mojang.serialization.Codec<A> arg0, String arg1, A arg2)
createStrictOptionalFieldCodec(com.mojang.serialization.Codec<A> codec, String field, A fallback)
m_295827_(com.mojang.serialization.Codec<A> p_298122_, String p_301181_, A p_300795_)
public static <E> com.mojang.serialization.MapCodec<E>
b(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>>
c(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<TemporalAccessor>
a(DateTimeFormatter arg0)
temporalCodec(DateTimeFormatter arg0)
method_53700(DateTimeFormatter arg0)
formattedTime(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_)
public static com.mojang.serialization.Codec<String>
b(int arg0, int arg1)
sizeLimitedString(int arg0, int arg1)
method_48109(int arg0, int arg1)
string(int minLength, int maxLength)
m_264337_(int p_265773_, int p_265217_)
public static <T> com.mojang.serialization.Codec<T>
e(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<? extends T> arg1)
withAlternative(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<? extends T> arg1)
method_52465(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<? extends T> arg1)
alternatively(com.mojang.serialization.Codec<T> a, com.mojang.serialization.Codec<? extends T> b)
m_293304_(com.mojang.serialization.Codec<T> p_300585_, com.mojang.serialization.Codec<? extends T> p_300484_)
public static <T, U> com.mojang.serialization.Codec<T>
a(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<U> arg1, Function<U, T> arg2)
withAlternative(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<U> arg1, Function<U, T> arg2)
method_52458(com.mojang.serialization.Codec<T> arg0, com.mojang.serialization.Codec<U> arg1, Function<U, T> arg2)
either(com.mojang.serialization.Codec<T> serialized, com.mojang.serialization.Codec<U> alternative, Function<U, T> alternativeMapper)
m_292858_(com.mojang.serialization.Codec<T> p_299945_, com.mojang.serialization.Codec<U> p_299401_, Function<U, T> p_297361_)
public static <T> com.mojang.serialization.Codec<it.unimi.dsi.fastutil.objects.Object2BooleanMap<T>>
d(com.mojang.serialization.Codec<T> arg0)
object2BooleanMap(com.mojang.serialization.Codec<T> arg0)
method_53058(com.mojang.serialization.Codec<T> arg0)
object2BooleanMap(com.mojang.serialization.Codec<T> keyCodec)
m_293159_(com.mojang.serialization.Codec<T> p_300841_)