Interface PositionableQuery<EntityType extends Positionable,​QueryType extends Query<EntityType,​QueryType>>

    • Method Detail

      • isOnMinimap

        default QueryType isOnMinimap()
        Only match entities that are on the minimap
        Returns:
        this query
      • findClosest

        default java.util.Optional<EntityType> findClosest()
        Executes this query and gets the closest matching entity to our player
        Returns:
        the closest matching entity, or an empty optional if none matched
      • findClosestByPathDistance

        default java.util.Optional<EntityType> findClosestByPathDistance()
        Executes this query and gets the closest matching entity to our player, based on path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)
        Returns:
        the closest matching entity, or an empty optional if none matched
      • tileEquals

        default QueryType tileEquals​(Positionable... positions)
        Only matches entities at the specified positions
        Parameters:
        positions - the positions to check
        Returns:
        this query
      • inArea

        default QueryType inArea​(Area... area)
        Only match entities in the specified areas
        Parameters:
        area - the areas to check
        Returns:
        this query
      • tileNotEquals

        default QueryType tileNotEquals​(Positionable... positions)
        Only match entities who are not at any of the specified positions
        Parameters:
        positions - the positions to check
        Returns:
        this query
      • notInArea

        default QueryType notInArea​(Area... area)
        Only match entities who are not in any of the specified areas
        Parameters:
        area - the areas to check
        Returns:
        this query
      • maxDistance

        default QueryType maxDistance​(double maxDistance)
        Only match entities who are at most the specified distance away from our player
        Parameters:
        maxDistance - the max distance of entities to find
        Returns:
        this query
      • maxDistance

        default QueryType maxDistance​(Positionable source,
                                      double maxDistance)
        Only match entities who are at most the specified distance away from the specified location
        Parameters:
        source - the position to use as the base for calculating the entities distance from
        maxDistance - the max distance of entities to find
        Returns:
        this query
      • maxPathDistance

        default QueryType maxPathDistance​(double maxDistance)
        Only match entities who are at most the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)
        Parameters:
        maxDistance - the max distance of entities to find
        Returns:
        this query
      • minDistance

        default QueryType minDistance​(double min)
        Only match entities who are at least the specified distance away from our player
        Parameters:
        min - the min distance of entities to find
        Returns:
        this query
      • minPathDistance

        default QueryType minPathDistance​(double min)
        Only match entities who are at least the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)
        Parameters:
        min - the min distance of entities to find
        Returns:
        this query
      • minDistance

        default QueryType minDistance​(Positionable source,
                                      double min)
        Only match entities who are at least the specified distance away from the specified location
        Parameters:
        source - the position to use as the base for calculating the entities distance from
        min - the min distance of entities to find
        Returns:
        this query
      • sortedByDistance

        default QueryType sortedByDistance()
        Sorts the entities by their distance to our player, with the closest appearing first
        Returns:
        this query
      • sortedByDistance

        default QueryType sortedByDistance​(Positionable source)
        Sorts the entities by their distance to the specified location, with the closest appearing first
        Parameters:
        source - the position to use as the base for calculating the entities distance from
        Returns:
        this query
      • sortedByPathDistance

        default QueryType sortedByPathDistance()
        Sorts the entities by their path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)
        Returns:
        this query
      • isInLineOfSight

        default QueryType isInLineOfSight()
        Unmaintained. Only match entities that are in the line of sight
        Returns:
        this query
      • hasLineOfSightTo

        default QueryType hasLineOfSightTo​(Positionable other)
        Unmaintained. Only match entities that have line of sight to the target
        Parameters:
        other - the target entity
        Returns:
        this query
      • isInLineOfSight

        default QueryType isInLineOfSight​(Positionable source)
        Unmaintained. Only match entities that are in the line of sight of the source
        Parameters:
        source - the source position
        Returns:
        this query