Interface RangeDispatchPredicate
- All Superinterfaces:
MinecraftPredicate<ItemPredicateContext>,Predicate<ItemPredicateContext>
@GeyserProvided
@NonExtendable
public interface RangeDispatchPredicate
extends MinecraftPredicate<ItemPredicateContext>
Represents a predicate that tests if a specific property is above a specific threshold.
These can be created using the factories in the
ItemRangeDispatchPredicate interface.- Since:
- 2.9.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different properties available to check the range of -
Method Summary
Modifier and TypeMethodDescription@org.checkerframework.checker.index.qual.NonNegative intindex()Only used forRangeDispatchPredicate.Property.CUSTOM_MODEL_DATA.booleannegated()booleanSome predicates, such asRangeDispatchPredicate.Property.DAMAGEandRangeDispatchPredicate.Property.COUNT, can be normalized against their maximum properties.property()doubleMethods inherited from interface org.geysermc.geyser.api.predicate.MinecraftPredicate
and, negate, or
-
Method Details
-
property
RangeDispatchPredicate.Property property()- Returns:
- the property type to check against
- Since:
- 2.9.3
- See Also:
-
threshold
double threshold()- Returns:
- the threshold above which this predicate is true
- Since:
- 2.9.3
-
index
@org.checkerframework.checker.index.qual.NonNegative int index()Only used forRangeDispatchPredicate.Property.CUSTOM_MODEL_DATA. If this predicate is any other property, this method will return 0.- Returns:
- the index
- Since:
- 2.9.3
-
normalized
boolean normalized()Some predicates, such asRangeDispatchPredicate.Property.DAMAGEandRangeDispatchPredicate.Property.COUNT, can be normalized against their maximum properties. If the property is not one of the two listed, this will always return false.- Returns:
- whether this predicate is normalized
- Since:
- 2.9.3
-
negated
boolean negated()- Returns:
- whether this predicate is negated
- Since:
- 2.9.3
-