Class GameObjects


  • public class GameObjects
    extends java.lang.Object
    Provides functionality for collecting and querying all types of game-related tile objects in the RuneLite scene (wall, ground, decorative, and game objects).
    • Constructor Summary

      Constructors 
      Constructor Description
      GameObjects()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean checkImpostorIds​(net.runelite.api.TileObject obj, int id)
      Checks if a TileObject has any impostor IDs that match the given single ID.
      net.runelite.api.TileObject findTileObject​(int z, int x, int y, int id)
      Finds a TileObject at a specific scene coordinate and object ID.
      boolean findTileObject​(net.runelite.api.coords.WorldPoint location)
      Checks if any tile object exists at the given WorldPoint.
      boolean objectIdEquals​(net.runelite.api.TileObject obj, int id)
      Checks whether a tile object or any of its impostor variants matches the given ID.
      boolean objectIdEquals​(net.runelite.api.TileObject obj, java.util.Collection<java.lang.Integer> ids)
      Checks whether a tile object or any of its impostor variants matches any of the given IDs.
      TileObjectQuery query()
      Queries all visible tile objects (game, wall, decorative, and ground) and returns a TileObjectQuery for filtering.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GameObjects

        public GameObjects()
    • Method Detail

      • query

        public TileObjectQuery query()
        Queries all visible tile objects (game, wall, decorative, and ground) and returns a TileObjectQuery for filtering. Results are cached per game tick for efficiency.
        Returns:
        TileObjectQuery representing all visible objects in the scene.
      • findTileObject

        public net.runelite.api.TileObject findTileObject​(int z,
                                                          int x,
                                                          int y,
                                                          int id)
        Finds a TileObject at a specific scene coordinate and object ID.
        Parameters:
        z - The plane/height level.
        x - X-coordinate in scene.
        y - Y-coordinate in scene.
        id - The object ID to match.
        Returns:
        The matching TileObject, or null if none found.
      • objectIdEquals

        public boolean objectIdEquals​(net.runelite.api.TileObject obj,
                                      int id)
        Checks whether a tile object or any of its impostor variants matches the given ID.
        Parameters:
        obj - The TileObject to check.
        id - The object ID to compare against.
        Returns:
        True if matches directly or via impostor ID.
      • objectIdEquals

        public boolean objectIdEquals​(net.runelite.api.TileObject obj,
                                      java.util.Collection<java.lang.Integer> ids)
        Checks whether a tile object or any of its impostor variants matches any of the given IDs.
        Parameters:
        obj - The TileObject to check.
        ids - A collection of valid IDs to match.
        Returns:
        True if any ID matches.
      • checkImpostorIds

        public static boolean checkImpostorIds​(net.runelite.api.TileObject obj,
                                               int id)
        Checks if a TileObject has any impostor IDs that match the given single ID.
        Parameters:
        obj - The TileObject whose impostors to check.
        id - The ID to compare against.
        Returns:
        True if any impostor ID matches.
      • findTileObject

        public boolean findTileObject​(net.runelite.api.coords.WorldPoint location)
        Checks if any tile object exists at the given WorldPoint.
        Parameters:
        location - The world location to check.
        Returns:
        True if a tile object exists at that point.