Class TileObjectQuery


  • public class TileObjectQuery
    extends Query<KSObject,​TileObjectQuery>
    A query class for filtering and retrieving tile objects based on various criteria.
    • Constructor Detail

      • TileObjectQuery

        public TileObjectQuery​(java.util.Collection<KSObject> ts)
        Constructs a TileObjectQuery with the specified collection of tile objects.
        Parameters:
        ts - the collection of KSTileObject instances to query.
    • Method Detail

      • withinDistance

        public TileObjectQuery withinDistance​(int distance)
        Filters the tile objects within the specified distance from the player's current location.
        Parameters:
        distance - the maximum distance to filter by.
        Returns:
        the updated TileObjectQuery instance with filtered tile objects.
      • atLocation

        public TileObjectQuery atLocation​(net.runelite.api.coords.WorldPoint... location)
        Filters the tile objects at specific locations.
        Parameters:
        location - one or more WorldPoint locations to filter by.
        Returns:
        the updated TileObjectQuery instance with tile objects at the specified locations.
      • notAtLocations

        public TileObjectQuery notAtLocations​(net.runelite.api.coords.WorldPoint... location)
        Filters out the tile objects at specific locations.
        Parameters:
        location - one or more WorldPoint locations to exclude.
        Returns:
        the updated TileObjectQuery instance with tile objects not at the specified locations.
      • nearestToPlayer

        public KSObject nearestToPlayer()
        Retrieves the tile object nearest to the player's current location.
        Returns:
        the nearest KSTileObject instance, or null if no object is found.
      • closest

        public KSObject closest()
        Retrieves the closest tile object to the player's current location.
        Returns:
        the closest KSTileObject instance, or null if no object is found.
      • nearestToPoint

        public KSObject nearestToPoint​(net.runelite.api.coords.WorldPoint point)
        Retrieves the tile object nearest to a specific WorldPoint.
        Parameters:
        point - the WorldPoint to measure distance from.
        Returns:
        the nearest KSTileObject instance to the specified point, or null if no object is found.
      • inArea

        public TileObjectQuery inArea​(net.runelite.api.coords.WorldArea area)
        Filters the tile objects within a specific WorldArea.
        Parameters:
        area - the WorldArea to filter by.
        Returns:
        the updated TileObjectQuery instance with tile objects within the specified area.