Class PrivObject
java.lang.Object
privbot.wrappers.PrivObject
Scene object wrapper; interactions go through the game client.
Wraps the live client TileObject. Definition reads (getName(),
getActions(), hasAction(String)) resolve the object's current transform and
should run on the client thread; interact(String), exists() and the
localPlayer*Of checks marshal through GameThread.ensure(java.util.function.Supplier<T>, T) themselves.
-
Method Summary
Modifier and TypeMethodDescriptiondoubledistanceTo(net.runelite.api.coords.WorldPoint p) Tile-step (Chebyshev) distance top, ignoring the plane (see the note in the body);Double.MAX_VALUEwhen either location is unknown.booleanexists()True if a scene object with the same id still exists at this tile (refreshed scan).String[]A copy of the transformed definition's raw action array (tags not stripped, null entries kept).intgetId()The object's scene id (before any varbit transform), or -1 without an object.getName()The transformed definition's name with tags stripped, or"object:<id>"when the definition cannot be read.net.runelite.api.TileObjectThe wrapped client object (may be null).net.runelite.api.coords.WorldPointThe object's world tile, or null when unknown.booleanWhether the object definition exposes this action (e.g.booleanhasActionLenientDefinitionScan(String action) LikehasAction(String)but, when the varbit-resolved composition has no matching action, also checks every distinct template id on the base definition (base id +ObjectComposition.getImpostorIds()).booleanResolves the menu entry by name (e.g.booleanbooleanTrue if the local player is strictly east of this object (higher X).booleanTrue if the logged-in player's tile is strictly north of this object's tile (higher map Y, same plane).booleanTrue if the local player is strictly south of this object (lower Y).booleanTrue if the local player is strictly west of this object (lower X).net.runelite.api.PointThe scene tile an interaction with this object is dispatched against (menu param0/param1).
-
Method Details
-
getTileObject
public net.runelite.api.TileObject getTileObject()The wrapped client object (may be null). Raw reads on it are not marshalled. -
getId
public int getId()The object's scene id (before any varbit transform), or -1 without an object. -
getWorldLocation
public net.runelite.api.coords.WorldPoint getWorldLocation()The object's world tile, or null when unknown. -
getName
The transformed definition's name with tags stripped, or"object:<id>"when the definition cannot be read. Empty only without an object or client. -
distanceTo
public double distanceTo(net.runelite.api.coords.WorldPoint p) Tile-step (Chebyshev) distance top, ignoring the plane (see the note in the body);Double.MAX_VALUEwhen either location is unknown. -
localPlayerNorthOf
public boolean localPlayerNorthOf()True if the logged-in player's tile is strictly north of this object's tile (higher map Y, same plane). SeePlayerRelativeToPoint. -
localPlayerSouthOf
public boolean localPlayerSouthOf()True if the local player is strictly south of this object (lower Y). -
localPlayerWestOf
public boolean localPlayerWestOf()True if the local player is strictly west of this object (lower X). -
localPlayerEastOf
public boolean localPlayerEastOf()True if the local player is strictly east of this object (higher X). -
hasAction
Whether the object definition exposes this action (e.g. Open, Mine). -
hasActionLenientDefinitionScan
LikehasAction(String)but, when the varbit-resolved composition has no matching action, also checks every distinct template id on the base definition (base id +ObjectComposition.getImpostorIds()). Some RSPS builds leave the resolved template'sactionsarray empty while another impostor id still carries the real Open/Search strings the server honors. -
getActions
A copy of the transformed definition's raw action array (tags not stripped, null entries kept). Empty, never null, when unreadable. An array of nulls usually means the definition is not decoded yet, not that the object has no options. -
exists
public boolean exists()True if a scene object with the same id still exists at this tile (refreshed scan).Must read the scene on the game thread; re-enters safely when called from a script thread.
-
interact
Resolves the menu entry by name (e.g. Open, Mine) and dispatches the matching object option.If the requested text is not found on the object definition, returns
false— it does not fall back to option index 0 (that previously caused e.g. "Enter" when "Private" was missing from the match). -
interact
- Parameters:
walkOntoObject- when true, the full packed object tag is passed so Impact's object-menu builder validatestileContainsUid(plane,x,y,tag)and AUTO-WALKS the player onto the object's launch tile. That walk is REQUIRED for grip/launch obstacles (zip-line "Teeth-grip" only fires from an exact tile), but BREAKS jump/climb/squeeze obstacles (stepping stone, hurdle, …): those fire directly from the current adjacent tile via the action packet alone, and prepending a walk-onto-object stops the jump. So callers escalate: dispatch direct (false) first, and only pass true if no progress results. 0 tag on the RuneLite EventBus path is harmless.
-
scenePoint
public net.runelite.api.Point scenePoint()The scene tile an interaction with this object is dispatched against (menu param0/param1).
-