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

public abstract class EntityStatBoundCondition extends Condition
A class that represents a condition based on an entity stat's bound value.
  • Field Details

  • Constructor Details

    • EntityStatBoundCondition

      public EntityStatBoundCondition(boolean inverse, int stat)
      Default Constructor for a EntityStatBoundCondition instance.
      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: Condition
      The internal evaluation method for the condition.
      Specified by:
      eval0 in class Condition
      Parameters:
      componentAccessor - The ComponentAccessor<EntityStore> for store access.
      ref - The entity reference of the entity.
      currentTime - The current world time.
      Returns:
      true if the condition is met, false otherwise.
    • 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:
      true if the condition is met, false otherwise.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Condition