TileObjectEx
An object on a tile, such as a tree, door or bank booth.
ClassRLPlugins API
public class TileObjectEx implements EntityGet one from TileObjectAPI.get(String...).
Members
Constructors
- newTileObjectEx(TileObject)
Creates a TileObjectEx.
Methods
- intgetActionIndex(String)
The place of the first action that contains this text, or -1.
- String[]getActions()
The right-click actions.
- intgetAnimation()
The id of the animation it plays.
- PointgetCanvasTextLocation(Graphics2D, String, int)
Project an object label to the canvas using the object's native height and position.
- ShapegetClickbox()
Project the interaction clickbox without substituting the model's convex hull.
- intgetConfig()
Its raw config number. It holds the shape and the rotation.
- longgetHash()
Actual scene object tag, including its packed local position and object identity.
- intgetId()
The object's ID.
- WorldPointgetInteractionPoint()
Gets the closest WorldPoint from which this object can be interacted with.
- WorldPointgetInteractionPoint(WorldPoint)
A tile you can use it from, near the given tile.
- LocalPointgetLocalPoint()
Where it is inside the loaded area, in local units.
- StringgetName()
The object's name, without color tags.
- ObjectCompositiongetObjectComposition()
The object's definition: name, actions and size.
- intgetOrientation()
Which way it faces.
- intgetOrientationUnits()
Native game-object facing angle in 0..2047 client units; -1 for other object types.
- ShapegetShape()
Its outline on screen.
- intgetShapeFlag()
Its object shape as a number, such as wall or ground decoration.
- TilegetTile()
The tile it is on.
- TileObjectgetTileObject()
The RuneLite
TileObjectbehind it. - List<String>getTransformationNames()
Names of the base definition's transformations, in definition order.
- intgetTransformVarbit()
The selected object's base transformation varbit, or -1 when it has none.
- intgetType()
Its object kind, as a number.
- WorldAreagetWorldArea()
The tiles it covers.
- WorldPointgetWorldLocation()
The tile it is on, as a world position.
- WorldPointgetWorldPoint()
The tile the object is on.
- WorldViewgetWorldView()
The world view it is in: the main world, or a boat.
- intgetWorldViewId()
Which world view the object is in.
- booleanhasAction(String)
Whether it has this action.
- voidinteract(String...)
Clicks one of its actions.
- voidinteract(int)
Clicks one of its actions.
- Set<WorldPoint>interactableFrom()
Gets all WorldPoints from which this object can be interacted with.
- booleanisActionVisible(String)
Whether this action shows in its right-click menu right now.
- booleanisGameObject()
Whether this wrapper represents a scene GameObject, rather than a wall or decoration.
- booleanisOpVisible(int)
Checks if the specified action index is visible for this object.
- booleanisReachable()
Whether you can walk to a tile you can use it from.
- booleanisSameObject(TileObjectEx)
Whether both are the same object in the scene.
- TileObjectExof(TileObject)
Wraps a RuneLite
TileObject. Givesnullfornull.
TileObjectEx(TileObject)
public TileObjectEx(TileObject tileObject)Creates a TileObjectEx.
Parameters
tileObject- Tile object.
getActionIndex(String)
public int getActionIndex(String action)The place of the first action that contains this text, or -1.
Parameters
action- Action.
getActions()
public String[] getActions()The right-click actions.
getAnimation()
public int getAnimation()The id of the animation it plays.
getCanvasTextLocation(Graphics2D, String, int)
public Point getCanvasTextLocation(Graphics2D graphics, String text, int heightOffset)Project an object label to the canvas using the object's native height and position.
Parameters
graphics- Graphics used to measure the label.
text- Label text.
heightOffset- Vertical offset above the object.
Returns
Canvas text position, or null when it cannot be projected.
getClickbox()
public Shape getClickbox()Project the interaction clickbox without substituting the model's convex hull.
getConfig()
public int getConfig()Its raw config number. It holds the shape and the rotation.
getHash()
public long getHash()Actual scene object tag, including its packed local position and object identity.
getId()
public int getId()The object's ID.
Returns
The object ID.
getInteractionPoint()
public WorldPoint getInteractionPoint()Gets the closest WorldPoint from which this object can be interacted with.
Returns
The closest WorldPoint from which the object can be interacted with.
getInteractionPoint(WorldPoint)
public WorldPoint getInteractionPoint(WorldPoint to)A tile you can use it from, near the given tile.
Parameters
to- To.
getLocalPoint()
public LocalPoint getLocalPoint()Where it is inside the loaded area, in local units.
getName()
public String getName()The object's name, without color tags.
Some objects change as you progress, such as a door that opens after a quest. This is the name of the version you see.
Returns
The name, or null when the object has none.
getObjectComposition()
public ObjectComposition getObjectComposition()The object's definition: name, actions and size.
getOrientation()
public int getOrientation()Which way it faces.
getOrientationUnits()
public int getOrientationUnits()Native game-object facing angle in 0..2047 client units; -1 for other object types.
getShape()
public Shape getShape()Its outline on screen.
getShapeFlag()
public int getShapeFlag()Its object shape as a number, such as wall or ground decoration.
getTile()
public Tile getTile()The tile it is on.
getTileObject()
public TileObject getTileObject()The RuneLite TileObject behind it.
getTransformationNames()
public List<String> getTransformationNames()Names of the base definition's transformations, in definition order.
getTransformVarbit()
public int getTransformVarbit()The selected object's base transformation varbit, or -1 when it has none.
getType()
public int getType()Its object kind, as a number.
getWorldArea()
public WorldArea getWorldArea()The tiles it covers.
getWorldLocation()
public WorldPoint getWorldLocation()The tile it is on, as a world position.
getWorldPoint()
public WorldPoint getWorldPoint()The tile the object is on.
Returns
Its position in the world.
getWorldView()
public WorldView getWorldView()The world view it is in: the main world, or a boat.
getWorldViewId()
public int getWorldViewId()Which world view the object is in.
Returns
The world view ID.
hasAction(String)
public boolean hasAction(String action)Whether it has this action.
Parameters
action- Action.
interact(String...)
public void interact(String... actions)Clicks one of its actions.
Parameters
actions- Actions.
interact(int)
public void interact(int action)Clicks one of its actions.
Parameters
action- Action.
interactableFrom()
public Set<WorldPoint> interactableFrom()Gets all WorldPoints from which this object can be interacted with.
Takes into account walls that may block access. Does not account for reachability Only works for GameObjects (type 2).
Returns
A set of WorldPoints from which the object can be interacted with.
isActionVisible(String)
public boolean isActionVisible(String action)Whether this action shows in its right-click menu right now.
Parameters
action- Action.
isGameObject()
public boolean isGameObject()Whether this wrapper represents a scene GameObject, rather than a wall or decoration.
isOpVisible(int)
public boolean isOpVisible(int op)Checks if the specified action index is visible for this object.
Parameters
op- The action index to check (0-based).
Returns
True if the action is visible, false otherwise.
isReachable()
public boolean isReachable()Whether you can walk to a tile you can use it from.
isSameObject(TileObjectEx)
public boolean isSameObject(TileObjectEx other)Whether both are the same object in the scene.
Parameters
other- Other.
of(TileObject)static
public static TileObjectEx of(TileObject object)Wraps a RuneLite TileObject. Gives null for null.
Parameters
object- Object.
Also allowed
Every class has these, as in plain Java.
distanceTo, equals, isInteractable, toString