Class ClampedInt
java.lang.Object
net.minecraft.util.valueproviders.IntProvider
net.minecraft.util.valueproviders.ClampedInt
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<ClampedInt> private final int
private final int
private final IntProvider
Fields inherited from class net.minecraft.util.valueproviders.IntProvider
NON_NEGATIVE_CODEC, POSITIVE_CODEC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
getType()
static ClampedInt
of
(IntProvider p_146396_, int p_146397_, int p_146398_) int
sample
(RandomSource p_216834_) Methods inherited from class net.minecraft.util.valueproviders.IntProvider
codec, validateCodec
-
Field Details
-
CODEC
-
source
-
minInclusive
private final int minInclusive -
maxInclusive
private final int maxInclusive
-
-
Constructor Details
-
ClampedInt
-
-
Method Details
-
of
-
sample
- Specified by:
sample
in classIntProvider
-
getMinValue
public int getMinValue()- Specified by:
getMinValue
in classIntProvider
-
getMaxValue
public int getMaxValue()- Specified by:
getMaxValue
in classIntProvider
-
getType
- Specified by:
getType
in classIntProvider
-