Package rs.kreme.ksbot.api.hooks
Class GameObjects
- java.lang.Object
-
- rs.kreme.ksbot.api.hooks.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 aTileObject
at a specific scene coordinate and object ID.boolean
findTileObject(net.runelite.api.coords.WorldPoint location)
Checks if any tile object exists at the givenWorldPoint
.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 aTileObjectQuery
for filtering.
-
-
-
Method Detail
-
query
public TileObjectQuery query()
Queries all visible tile objects (game, wall, decorative, and ground) and returns aTileObjectQuery
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 aTileObject
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 givenWorldPoint
.- Parameters:
location
- The world location to check.- Returns:
- True if a tile object exists at that point.
-
-