Class IntProvider

java.lang.Object
net.minecraft.util.valueproviders.IntProvider
Direct Known Subclasses:
BiasedToBottomInt, ClampedInt, ClampedNormalInt, ConstantInt, UniformInt, WeightedListInt

public abstract class IntProvider extends Object
  • Field Details

    • CONSTANT_OR_DISPATCH_CODEC

      private static final com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<Integer,IntProvider>> CONSTANT_OR_DISPATCH_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<IntProvider> CODEC
    • NON_NEGATIVE_CODEC

      public static final com.mojang.serialization.Codec<IntProvider> NON_NEGATIVE_CODEC
    • POSITIVE_CODEC

      public static final com.mojang.serialization.Codec<IntProvider> POSITIVE_CODEC
  • Constructor Details

    • IntProvider

      public IntProvider()
  • Method Details

    • codec

      public static com.mojang.serialization.Codec<IntProvider> codec(int p_146546_, int p_146547_)
    • validateCodec

      public static <T extends IntProvider> com.mojang.serialization.Codec<T> validateCodec(int p_330202_, int p_327757_, com.mojang.serialization.Codec<T> p_336105_)
    • validate

      private static <T extends IntProvider> com.mojang.serialization.DataResult<T> validate(int p_331801_, int p_334933_, T p_329862_)
    • sample

      public abstract int sample(RandomSource p_216855_)
    • getMinValue

      public abstract int getMinValue()
    • getMaxValue

      public abstract int getMaxValue()
    • getType

      public abstract IntProviderType<?> getType()