Class ExtraCodecs

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

public class ExtraCodecs extends Object
  • Field Details

    • 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
  • Constructor Details

    • ExtraCodecs

      public ExtraCodecs()
  • Method Details

    • xor

      public static <F,​ S> com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<F,​S>> xor(com.mojang.serialization.Codec<F> p_144640_, com.mojang.serialization.Codec<S> p_144641_)
    • checkRangeWithMessage

      private static <N extends Number & Comparable<N>> Function<N,​com.mojang.serialization.DataResult<N>> checkRangeWithMessage(N p_144645_, N p_144646_, Function<N,​String> p_144647_)
    • intRangeWithMessage

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

      public static <T> Function<List<T>,​com.mojang.serialization.DataResult<List<T>>> nonEmptyListCheck()
    • nonEmptyList

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

      public static <T> Function<List<Supplier<T>>,​com.mojang.serialization.DataResult<List<Supplier<T>>>> nonNullSupplierListCheck()
    • nonNullSupplierCheck

      public static <T> Function<Supplier<T>,​com.mojang.serialization.DataResult<Supplier<T>>> nonNullSupplierCheck()