GameObject

public class GameObject implements Named, Actionable, Identifiable, Interactable, Orientable, Modellable

Represents a game object

See also

Constructors

GameObject
Link copied to clipboard
void GameObject(RSObject rsObject)

Functions

adjustCameraTo
Link copied to clipboard
boolean adjustCameraTo()
Moves the camera to a position where the given entity or position is in view.
click
Link copied to clipboard
boolean click()
Interacts with the entity, with the first action available.
boolean click(String action)
Interacts with the entity, given a specific action.
distance
Link copied to clipboard
int distance()
Determines the distance between this entity/tile and the local player
distanceTo
Link copied to clipboard
int distanceTo(Positionable position)
Determines the distance between this entity/tile and the given entity/tile
equals
Link copied to clipboard
boolean equals(Object o)
getActions
Link copied to clipboard
List<StringgetActions()
Gets the available actions for the entity, usually dependent on their definition.
getAllTiles
Link copied to clipboard
List<WorldTilegetAllTiles()
getDefinition
Link copied to clipboard
ObjectDefinition getDefinition()
getId
Link copied to clipboard
int getId()
Gets the ID of the entity
getLegacyRSObject
Link copied to clipboard
RSObject getLegacyRSObject()
getModel
Link copied to clipboard
Optional<ModelgetModel()
Gets the entity model
getName
Link copied to clipboard
String getName()
Determines the name of the entity of the object this method is called on.
getNeighboringTiles
Link copied to clipboard
List<TilegetNeighboringTiles()
getOrientation
Link copied to clipboard
Orientable.Orientation getOrientation()
Gets the orientation of this entity
getTile
Link copied to clipboard
WorldTile getTile()
Gets the WorldTile of this entity/position
hashCode
Link copied to clipboard
int hashCode()
hover
Link copied to clipboard
boolean hover()
Moves the mouse to a human-randomized point on the entity.
boolean hover(String action)
Hovers the specified action on this entity.
hoverMenu
Link copied to clipboard
boolean hoverMenu(String action)
Hovers the specified action on this entity, always right-clicking and hovering over the menu
interact
Link copied to clipboard
boolean interact(String action)
Attempts to interact with the entity using the given action.
boolean interact(String action, BooleanSupplier interruptCondition)
Attempts to interact with the entity using the given action.
isHovering
Link copied to clipboard
boolean isHovering()
Checks if the mouse is currently over this entity
isVisible
Link copied to clipboard
boolean isVisible()
Determines if the entity is on the screen and able to be clicked.
toString
Link copied to clipboard
String toString()

Properties

definition
Link copied to clipboard
private ObjectDefinition definition