Interface IGameObject

All Superinterfaces:
net.runelite.api.GameObject, Identifiable, Interactable, ITileObject, Locatable, Nameable, RuneLiteWrapper<net.runelite.api.TileObject>, SceneEntity, TileEntity, net.runelite.api.TileObject, Transformable<net.runelite.api.ObjectComposition>

public interface IGameObject extends net.runelite.api.GameObject, ITileObject
Represents an interactive game object in the world.

Game objects are the most common type of tile object and include:

  • Trees and rocks (skilling)
  • Doors and gates
  • Banks, furnaces, anvils
  • NPCs that are actually objects (e.g., fishing spots)
  • Most interactive scenery

Game objects can span multiple tiles. Use getWorldArea() to get the full area occupied by the object.

Example usage:

 
 IGameObject tree = TileObjects.getNearest("Oak");
 if (tree != null && tree.hasAction("Chop down")) {
     tree.interact("Chop down");
 }
 
 

See Also:
  • Method Details

    • getWorldArea

      net.runelite.api.coords.WorldArea getWorldArea()
      Gets the world area occupied by this game object.

      Large objects like trees or buildings can span multiple tiles. This returns the full rectangular area the object occupies.

      Returns:
      the world area of this object