Class ExtraCodecs

java.lang.Object
net.minecraft.util.ExtraCodecs

public class ExtraCodecs extends Object
  • Field Details

    • JSON

      public static final com.mojang.serialization.Codec<com.google.gson.JsonElement> JSON
    • JAVA

      public static final com.mojang.serialization.Codec<Object> JAVA
    • VECTOR3F

      public static final com.mojang.serialization.Codec<org.joml.Vector3f> VECTOR3F
    • VECTOR4F

      public static final com.mojang.serialization.Codec<org.joml.Vector4f> VECTOR4F
    • QUATERNIONF_COMPONENTS

      public static final com.mojang.serialization.Codec<org.joml.Quaternionf> QUATERNIONF_COMPONENTS
    • AXISANGLE4F

      public static final com.mojang.serialization.Codec<org.joml.AxisAngle4f> AXISANGLE4F
    • QUATERNIONF

      public static final com.mojang.serialization.Codec<org.joml.Quaternionf> QUATERNIONF
    • MATRIX4F

      public static com.mojang.serialization.Codec<org.joml.Matrix4f> MATRIX4F
    • ARGB_COLOR_CODEC

      public static final com.mojang.serialization.Codec<Integer> ARGB_COLOR_CODEC
    • UNSIGNED_BYTE

      public static final com.mojang.serialization.Codec<Integer> UNSIGNED_BYTE
    • NON_NEGATIVE_INT

      public static final com.mojang.serialization.Codec<Integer> NON_NEGATIVE_INT
    • POSITIVE_INT

      public static final com.mojang.serialization.Codec<Integer> POSITIVE_INT
    • POSITIVE_FLOAT

      public static final com.mojang.serialization.Codec<Float> POSITIVE_FLOAT
    • PATTERN

      public static final com.mojang.serialization.Codec<Pattern> PATTERN
    • INSTANT_ISO8601

      public static final com.mojang.serialization.Codec<Instant> INSTANT_ISO8601
    • BASE64_STRING

      public static final com.mojang.serialization.Codec<byte[]> BASE64_STRING
    • ESCAPED_STRING

      public static final com.mojang.serialization.Codec<String> ESCAPED_STRING
    • TAG_OR_ELEMENT_ID

      public static final com.mojang.serialization.Codec<ExtraCodecs.TagOrElementLocation> TAG_OR_ELEMENT_ID
    • toOptionalLong

      public static final Function<Optional<Long>,OptionalLong> toOptionalLong
    • fromOptionalLong

      public static final Function<OptionalLong,Optional<Long>> fromOptionalLong
    • BIT_SET

      public static final com.mojang.serialization.Codec<BitSet> BIT_SET
    • PROPERTY

      private static final com.mojang.serialization.Codec<com.mojang.authlib.properties.Property> PROPERTY
    • PROPERTY_MAP

      public static final com.mojang.serialization.Codec<com.mojang.authlib.properties.PropertyMap> PROPERTY_MAP
    • PLAYER_NAME

      public static final com.mojang.serialization.Codec<String> PLAYER_NAME
    • GAME_PROFILE_WITHOUT_PROPERTIES

      private static final com.mojang.serialization.MapCodec<com.mojang.authlib.GameProfile> GAME_PROFILE_WITHOUT_PROPERTIES
    • GAME_PROFILE

      public static final com.mojang.serialization.Codec<com.mojang.authlib.GameProfile> GAME_PROFILE
    • NON_EMPTY_STRING

      public static final com.mojang.serialization.Codec<String> NON_EMPTY_STRING
    • CODEPOINT

      public static final com.mojang.serialization.Codec<Integer> CODEPOINT
    • RESOURCE_PATH_CODEC

      public static com.mojang.serialization.Codec<String> RESOURCE_PATH_CODEC
  • Constructor Details

    • ExtraCodecs

      public ExtraCodecs()
  • Method Details

    • converter

      public static <T> com.mojang.serialization.Codec<T> converter(com.mojang.serialization.DynamicOps<T> p_304929_)
    • intervalCodec

      public static <P, I> com.mojang.serialization.Codec<I> intervalCodec(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_)
    • orElsePartial

      public static <A> com.mojang.serialization.Codec.ResultFunction<A> orElsePartial(A p_184382_)
    • idResolverCodec

      public static <E> com.mojang.serialization.Codec<E> idResolverCodec(ToIntFunction<E> p_184422_, IntFunction<E> p_184423_, int p_184424_)
    • orCompressed

      public static <E> com.mojang.serialization.Codec<E> orCompressed(com.mojang.serialization.Codec<E> p_184426_, com.mojang.serialization.Codec<E> p_184427_)
    • orCompressed

      public static <E> com.mojang.serialization.MapCodec<E> orCompressed(com.mojang.serialization.MapCodec<E> p_304545_, com.mojang.serialization.MapCodec<E> p_304716_)
    • overrideLifecycle

      public static <E> com.mojang.serialization.Codec<E> overrideLifecycle(com.mojang.serialization.Codec<E> p_184369_, Function<E,com.mojang.serialization.Lifecycle> p_184370_, Function<E,com.mojang.serialization.Lifecycle> p_184371_)
    • overrideLifecycle

      public static <E> com.mojang.serialization.Codec<E> overrideLifecycle(com.mojang.serialization.Codec<E> p_326460_, Function<E,com.mojang.serialization.Lifecycle> p_326480_)
    • strictUnboundedMap

      public static <K, V> ExtraCodecs.StrictUnboundedMapCodec<K,V> strictUnboundedMap(com.mojang.serialization.Codec<K> p_301201_, com.mojang.serialization.Codec<V> p_300984_)
    • intRangeWithMessage

      private static com.mojang.serialization.Codec<Integer> intRangeWithMessage(int p_144634_, int p_144635_, Function<Integer,String> p_144636_)
    • intRange

      public static com.mojang.serialization.Codec<Integer> intRange(int p_270883_, int p_270323_)
    • floatRangeMinExclusiveWithMessage

      private static com.mojang.serialization.Codec<Float> floatRangeMinExclusiveWithMessage(float p_184351_, float p_184352_, Function<Float,String> p_184353_)
    • nonEmptyList

      public static <T> com.mojang.serialization.Codec<List<T>> nonEmptyList(com.mojang.serialization.Codec<List<T>> p_144638_)
    • nonEmptyHolderSet

      public static <T> com.mojang.serialization.Codec<HolderSet<T>> nonEmptyHolderSet(com.mojang.serialization.Codec<HolderSet<T>> p_203983_)
    • retrieveContext

      public static <E> com.mojang.serialization.MapCodec<E> retrieveContext(Function<com.mojang.serialization.DynamicOps<?>,com.mojang.serialization.DataResult<E>> p_203977_)
    • ensureHomogenous

      public static <E, L extends Collection<E>, T> Function<L,com.mojang.serialization.DataResult<L>> ensureHomogenous(Function<E,T> p_203985_)
    • catchDecoderException

      public static <A> com.mojang.serialization.Codec<A> catchDecoderException(com.mojang.serialization.Codec<A> p_216186_)
    • temporalCodec

      public static com.mojang.serialization.Codec<TemporalAccessor> temporalCodec(DateTimeFormatter p_216171_)
    • asOptionalLong

      public static com.mojang.serialization.MapCodec<OptionalLong> asOptionalLong(com.mojang.serialization.MapCodec<Optional<Long>> p_216167_)
    • sizeLimitedMap

      public static <K, V> com.mojang.serialization.Codec<Map<K,V>> sizeLimitedMap(com.mojang.serialization.Codec<Map<K,V>> p_330976_, int p_331151_)
    • object2BooleanMap

      public static <T> com.mojang.serialization.Codec<it.unimi.dsi.fastutil.objects.Object2BooleanMap<T>> object2BooleanMap(com.mojang.serialization.Codec<T> p_298255_)
    • dispatchOptionalValue

      @Deprecated public static <K, V> com.mojang.serialization.MapCodec<V> dispatchOptionalValue(String p_312812_, String p_312135_, com.mojang.serialization.Codec<K> p_312848_, Function<? super V,? extends K> p_312622_, Function<? super K,? extends com.mojang.serialization.Codec<? extends V>> p_312836_)
      Deprecated.
    • optionalEmptyMap

      public static <A> com.mojang.serialization.Codec<Optional<A>> optionalEmptyMap(com.mojang.serialization.Codec<A> p_330630_)