Class GraphicsObjectQuery


  • public class GraphicsObjectQuery
    extends Query<net.runelite.api.GraphicsObject,​GraphicsObjectQuery>
    A specialized query class for filtering and retrieving GraphicsObject entities in the game. Extends the generic Query class and integrates contextual game utilities.
    • Constructor Detail

      • GraphicsObjectQuery

        public GraphicsObjectQuery​(java.util.Collection<net.runelite.api.GraphicsObject> objs)
        Constructs a new GraphicsObjectQuery instance.
        Parameters:
        objs - the collection of graphics objects to query.
    • Method Detail

      • within

        public GraphicsObjectQuery within​(int distance)
        Filters graphics objects within a specified distance from the local player.
        Parameters:
        distance - the maximum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • within

        public GraphicsObjectQuery within​(net.runelite.api.coords.WorldPoint dest,
                                          int distance)
        Filters graphics objects within a specified distance from a destination world point.
        Parameters:
        dest - the destination world point to measure distance to.
        distance - the maximum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • within

        public GraphicsObjectQuery within​(net.runelite.api.coords.LocalPoint dest,
                                          int distance)
        Filters graphics objects within a specified distance from a destination local point.
        Parameters:
        dest - the destination local point to measure distance to.
        distance - the maximum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • aboveDistance

        public GraphicsObjectQuery aboveDistance​(int distance)
        Filters graphics objects above a certain distance from the local player.
        Parameters:
        distance - the minimum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • aboveDistance

        public GraphicsObjectQuery aboveDistance​(net.runelite.api.coords.WorldPoint dest,
                                                 int distance)
        Filters graphics objects above a certain distance from a destination world point.
        Parameters:
        dest - the destination world point to measure distance from.
        distance - the minimum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • aboveDistance

        public GraphicsObjectQuery aboveDistance​(net.runelite.api.coords.LocalPoint dest,
                                                 int distance)
        Filters graphics objects above a certain distance from a destination local point.
        Parameters:
        dest - the destination local point to measure distance from.
        distance - the minimum distance to filter by.
        Returns:
        the updated GraphicsObjectQuery instance.
      • walkable

        public GraphicsObjectQuery walkable()
        Filters graphics objects that are walkable.
        Returns:
        the updated GraphicsObjectQuery instance.
      • closest

        public net.runelite.api.GraphicsObject closest()
        Retrieves the closest graphics object to the local player.
        Returns:
        the closest graphics object, or null if no objects are found.
      • closest

        public net.runelite.api.GraphicsObject closest​(net.runelite.api.coords.LocalPoint point)
        Retrieves the closest graphics object to a specified local point.
        Parameters:
        point - the local point to measure distance from.
        Returns:
        the closest graphics object, or null if no objects are found.