Class IntRange
java.lang.Object
net.minecraft.world.level.storage.loot.IntRange
- All Implemented Interfaces:
LootContextUser, Validatable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IntRange.IntLimiterprivate final @Nullable NumberProviderprivate final @Nullable NumberProviderprivate final IntRange.IntChecker -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIntRange(Optional<NumberProvider> min, Optional<NumberProvider> max) privateIntRange(@Nullable NumberProvider min, @Nullable NumberProvider max) -
Method Summary
Modifier and TypeMethodDescriptionintclamp(LootContext context, int value) static IntRangeexact(int value) static IntRangelowerBound(int value) static IntRangerange(int min, int max) booleantest(LootContext context, int value) private OptionalIntstatic IntRangeupperBound(int value) voidvalidate(ValidationContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
RECORD_CODEC
-
CODEC
-
min
-
max
-
limiter
-
predicate
-
-
Constructor Details
-
IntRange
-
IntRange
-
-
Method Details
-
validate
- Specified by:
validatein interfaceLootContextUser- Specified by:
validatein interfaceValidatable
-
exact
-
range
-
lowerBound
-
upperBound
-
clamp
-
test
-
unpackExact
-