Class GameObject
- java.lang.Object
-
- org.dreambot.api.wrappers.interactive.interact.Interactable
-
- org.dreambot.api.wrappers.interactive.Entity
-
- org.dreambot.api.wrappers.interactive.GameObject
-
- All Implemented Interfaces:
Identifiable
,Locatable
,Verified
- Direct Known Subclasses:
BoundaryObject
,FloorDecoration
,SceneObject
,WallObject
public abstract class GameObject extends Entity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canReach(Tile tile)
Checks if this location is reachable by the provided tile without obstaclesdouble
distance()
double
distance(Tile tile)
Distance (as the crow flies) away from the given tile.double
distance(Entity entity)
Distance away from the given entity.boolean
equals(java.lang.Object obj)
boolean
exists()
Determines where or not this object exists in game.java.lang.String[]
getActions()
org.dreambot.internal.cache.wrappers.def.ObjectDef
getComposite()
abstract int
getFlags()
int
getHeight()
Gets the Tile 2D height of the object (furnace is 2x3, 3 is height)int
getID()
Gets ID number of the given object.abstract long
getIndex()
java.util.List<Tile>
getInteractableFrom()
Gets a list of valid tiles your player could be standing on to interact with the game object (not including diagonals)int
getLocalX()
int
getLocalY()
EntityModel
getModel()
Gets the model of the entityshort[]
getModelColors()
short[]
getModifiedModelColors()
java.lang.String
getName()
Gets the name of the entityint[]
getObjectModelTypes()
java.util.List<Tile>
getObjectTiles()
abstract int
getOrientation()
abstract int
getPlane()
int
getRealID()
abstract RenderableNode
getRenderable()
int
getRenderableHeight()
Gets the model's heightjava.util.List<Tile>
getSurrounding()
Gets the surrounding tiles (not including diagonals) around the GameObjectTile
getTile()
Gets tile of the object.TileReference
getTileReference()
Gets tile reference of the given object.int
getWidth()
Gets the Tile 2D width of the object (furnace is 2x3, 2 is width)int
getX()
Gets X coordinate of the given object.int
getY()
Gets Y coordinate of the given object.int
getZ()
Gets Z coordinate of the given object.boolean
hasAction(java.lang.String... actions)
Checks whether given actions are in the list of menu actions for an entityint
hashCode()
void
setTile(Tile t)
java.lang.String
toString()
-
Methods inherited from class org.dreambot.api.wrappers.interactive.Entity
canReach, getBoundingBox, getCenterPoint, getClickablePoint, getReference, getSurroundingArea, interact, isOnScreen, walkingDistance
-
Methods inherited from class org.dreambot.api.wrappers.interactive.interact.Interactable
interact, interact, interactForceLeft, interactForceRight
-
-
-
-
Method Detail
-
setTile
public void setTile(Tile t)
-
getSurrounding
public java.util.List<Tile> getSurrounding()
Gets the surrounding tiles (not including diagonals) around the GameObject- Returns:
- List of tiles surrounding game object
-
getInteractableFrom
public java.util.List<Tile> getInteractableFrom()
Gets a list of valid tiles your player could be standing on to interact with the game object (not including diagonals)- Returns:
- List of valid tiles to interact with the game object from
-
getObjectTiles
public java.util.List<Tile> getObjectTiles()
-
getIndex
public abstract long getIndex()
-
getActions
public java.lang.String[] getActions()
- Specified by:
getActions
in classEntity
-
getObjectModelTypes
public int[] getObjectModelTypes()
-
getID
public int getID()
Description copied from interface:Identifiable
Gets ID number of the given object.- Returns:
- the ID number as integer.
-
getX
public int getX()
Description copied from interface:Locatable
Gets X coordinate of the given object.- Returns:
- the X coordinate of the object.
-
getY
public int getY()
Description copied from interface:Locatable
Gets Y coordinate of the given object.- Returns:
- the Y coordinate of the object.
-
getZ
public int getZ()
Description copied from interface:Locatable
Gets Z coordinate of the given object.- Returns:
- the Z coordinate of the object.
-
getLocalX
public int getLocalX()
-
getLocalY
public int getLocalY()
-
getPlane
public abstract int getPlane()
-
getFlags
public abstract int getFlags()
-
getRealID
public int getRealID()
-
getComposite
public org.dreambot.internal.cache.wrappers.def.ObjectDef getComposite()
-
getHeight
public int getHeight()
Gets the Tile 2D height of the object (furnace is 2x3, 3 is height)- Returns:
- int value of the object's 2D height
-
getRenderableHeight
public int getRenderableHeight()
Gets the model's height- Specified by:
getRenderableHeight
in classEntity
- Returns:
- The model's height
-
getWidth
public int getWidth()
Gets the Tile 2D width of the object (furnace is 2x3, 2 is width)- Returns:
- int value of the object's 2D width
-
distance
public double distance(Entity entity)
Description copied from class:Entity
Distance away from the given entity.
-
distance
public double distance(Tile tile)
Description copied from interface:Locatable
Distance (as the crow flies) away from the given tile.
-
getName
public java.lang.String getName()
Description copied from class:Entity
Gets the name of the entity- Specified by:
getName
in interfaceIdentifiable
- Specified by:
getName
in classEntity
- Returns:
- name of entity
-
getOrientation
public abstract int getOrientation()
-
getModel
public EntityModel getModel()
Description copied from class:Entity
Gets the model of the entity
-
getTileReference
public TileReference getTileReference()
Description copied from interface:Locatable
Gets tile reference of the given object.- Specified by:
getTileReference
in interfaceLocatable
- Overrides:
getTileReference
in classEntity
- Returns:
- the object tile reference.
-
hasAction
public boolean hasAction(java.lang.String... actions)
Description copied from class:Entity
Checks whether given actions are in the list of menu actions for an entity
-
getModelColors
public short[] getModelColors()
-
getModifiedModelColors
public short[] getModifiedModelColors()
-
exists
public boolean exists()
Description copied from interface:Verified
Determines where or not this object exists in game.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
canReach
public boolean canReach(Tile tile)
Description copied from interface:Locatable
Checks if this location is reachable by the provided tile without obstacles- Parameters:
tile
- target tile- Returns:
- true if it can, false otherwise
-
getRenderable
public abstract RenderableNode getRenderable()
-
-