Class IntProvider
java.lang.Object
net.minecraft.util.valueproviders.IntProvider
- Direct Known Subclasses:
BiasedToBottomInt
,ClampedInt
,ClampedNormalInt
,ConstantInt
,UniformInt
,WeightedListInt
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<IntProvider> private static final com.mojang.serialization.Codec
<com.mojang.datafixers.util.Either<Integer, IntProvider>> static final com.mojang.serialization.Codec
<IntProvider> static final com.mojang.serialization.Codec
<IntProvider> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.Codec
<IntProvider> codec
(int p_146546_, int p_146547_) abstract int
abstract int
abstract IntProviderType
<?> getType()
abstract int
sample
(RandomSource p_216855_) private static <T extends IntProvider>
com.mojang.serialization.DataResult<T> validate
(int p_338299_, int p_338617_, T p_338788_) static <T extends IntProvider>
com.mojang.serialization.Codec<T> validateCodec
(int p_338363_, int p_338219_, com.mojang.serialization.Codec<T> p_338307_)
-
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
-
NON_NEGATIVE_CODEC
-
POSITIVE_CODEC
-
-
Constructor Details
-
IntProvider
public IntProvider()
-
-
Method Details
-
codec
-
validateCodec
public static <T extends IntProvider> com.mojang.serialization.Codec<T> validateCodec(int p_338363_, int p_338219_, com.mojang.serialization.Codec<T> p_338307_) -
validate
private static <T extends IntProvider> com.mojang.serialization.DataResult<T> validate(int p_338299_, int p_338617_, T p_338788_) -
sample
-
getMinValue
public abstract int getMinValue() -
getMaxValue
public abstract int getMaxValue() -
getType
-