GroundItem

public class GroundItem implements Modellable, Actionable, Named, Identifiable, Interactable, Stackable, ItemDefinable

Represents an item on the ground

See also

Constructors

GroundItem
Link copied to clipboard
void GroundItem(RSGroundItem groundItem)

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.
getDefinition
Link copied to clipboard
ItemDefinition getDefinition()
Gets the ItemDefinition for this item, which contains more details about the item.
getId
Link copied to clipboard
int getId()
Gets the ID of the entity
getLegacyRSGroundItem
Link copied to clipboard
RSGroundItem getLegacyRSGroundItem()
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.
getStack
Link copied to clipboard
int getStack()
Gets the stack of this item, which is how many of the item is occupying the item space.
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 ItemDefinition definition