Contents
Class EntityStatBoundCondition
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.condition.Condition
com.hypixel.hytale.server.core.modules.entity.condition.EntityStatBoundCondition
- Direct Known Subclasses:
StatCondition
A class that represents a condition based on an entity stat's bound value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<EntityStatBoundCondition> The codec used to parseEntityStatBoundConditioninstances. -
Constructor Summary
ConstructorsConstructorDescriptionEntityStatBoundCondition(boolean inverse, int stat) Default Constructor for aEntityStatBoundConditioninstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval0(ComponentAccessor<EntityStore> componentAccessor, Ref<EntityStore> ref, Instant currentTime) The internal evaluation method for the condition.abstract booleaneval0(Ref<EntityStore> ref, Instant currentTime, EntityStatValue statValue) Called to evaluate the condition for the given entity stat value.toString()Methods inherited from class Condition
allConditionsMet, allConditionsMet, eval
-
Field Details
-
CODEC
The codec used to parseEntityStatBoundConditioninstances.
-
-
Constructor Details
-
EntityStatBoundCondition
public EntityStatBoundCondition(boolean inverse, int stat) Default Constructor for aEntityStatBoundConditioninstance.- Parameters:
inverse- Whether to invert the condition's result.stat- The stat index to evaluate the condition against.
-
-
Method Details
-
eval0
public boolean eval0(@Nonnull ComponentAccessor<EntityStore> componentAccessor, @Nonnull Ref<EntityStore> ref, @Nonnull Instant currentTime) Description copied from class:ConditionThe internal evaluation method for the condition.- Specified by:
eval0in classCondition- Parameters:
componentAccessor- TheComponentAccessor<EntityStore>for store access.ref- The entity reference of the entity.currentTime- The current world time.- Returns:
trueif the condition is met,falseotherwise.
-
eval0
public abstract boolean eval0(@Nonnull Ref<EntityStore> ref, @Nonnull Instant currentTime, @Nonnull EntityStatValue statValue) Called to evaluate the condition for the given entity stat value.- Parameters:
ref- The entity reference of the entity.currentTime- The current world time.statValue- The entity stat value to evaluate.- Returns:
trueif the condition is met,falseotherwise.
-
toString
-