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 Deprecated 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
exists()
Determines where or not this object exists in game.java.lang.String[]
getActions()
int
getAdjustToTerrain()
int[]
getAlternativeIDs()
int
getAnimationID()
int
getBlockingMask()
Deprecated.int
getBrightness()
org.dreambot.internal.cache.wrappers.def.ObjectDefinition
getComposite()
int
getContrast()
int
getCurrentOrientation()
Returns the current orientation of an object based on its set flags and original orientation.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
getInteractType()
int
getLocalX()
int
getLocalY()
int
getMapAreaId()
int
getMapSceneID()
int
getMiniMapIcon()
Model
getModel()
Gets the model of the entityshort[]
getModelColors()
int
getModelSizeX()
int
getModelSizeY()
int
getModelSizeZ()
short[]
getModifiedModelColors()
java.lang.String
getName()
Gets the name of the entityint[]
getObjectModelTypes()
java.util.List<Tile>
getObjectTiles()
int
getOffsetX()
int
getOffsetY()
int
getOffsetZ()
abstract int
getOrientation()
java.util.Map<java.lang.Integer,java.lang.Object>
getParams()
abstract int
getPlane()
int
getRealID()
int
getRenderableHeight()
Gets the model's heightshort[]
getReTextureToFind()
short[]
getReTextureToReplace()
int
getSupportsItems()
java.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
getVarbitID()
int
getVarpID()
int
getWallOrDoor()
int
getWallThickness()
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 entityboolean
hasChildDefinitions()
boolean
isBlocksProjectiles()
boolean
isCastsShadows()
boolean
isImpenetrableSolid()
boolean
isNonFlatShading()
boolean
isObstructsGround()
boolean
isOccludes()
boolean
isRandomizeAnimationStart()
void
setTile(Tile t)
int
tileDistance(Tile tile)
Distance (Chebyshev/Tchebychev) away from the given tile.java.lang.String
toString()
double
walkingDistance(Tile tile)
Walking distance based on pathfinding to the given tile.-
Methods inherited from class org.dreambot.api.wrappers.interactive.Entity
canReach, equals, getBoundingBox, getCenterPoint, getClickablePoint, getLeftClickAction, getReference, getSurroundingArea, hashCode, interact, interact, interact, interact, interact, interactForceLeft, interactForceRight, isOnScreen
-
Methods inherited from class org.dreambot.api.wrappers.interactive.interact.Interactable
hover, rightClick
-
-
-
-
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.ObjectDefinition 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.
-
walkingDistance
public double walkingDistance(Tile tile)
Description copied from interface:Locatable
Walking distance based on pathfinding to the given tile.This is a more expensive call than
Locatable.distance(Tile)
, and should be used sparingly.- Specified by:
walkingDistance
in interfaceLocatable
- Overrides:
walkingDistance
in classEntity
- Parameters:
tile
- the destination tile.- Returns:
- return the path distance movement cost from the given tile as a double. If there isn't a path to the tile, it will return 3 times the as the crow flies distance.
-
tileDistance
public int tileDistance(Tile tile)
Description copied from interface:Locatable
Distance (Chebyshev/Tchebychev) away from the given tile. This is roughly the amount of single steps/moves away the tile is. This differs fromLocatable.distance(Tile)
because diagonals have the same cost.Note: this does not account for obstacles like
Locatable.walkingDistance(Tile)
does.- Parameters:
tile
- the destination tile- Returns:
- the Chebyshev distance 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()
-
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
-
getAdjustToTerrain
public int getAdjustToTerrain()
-
getAlternativeIDs
public int[] getAlternativeIDs()
-
getAnimationID
public int getAnimationID()
-
getBrightness
public int getBrightness()
-
getReTextureToFind
public short[] getReTextureToFind()
-
getReTextureToReplace
public short[] getReTextureToReplace()
-
isOccludes
public boolean isOccludes()
-
isImpenetrableSolid
public boolean isImpenetrableSolid()
-
getContrast
public int getContrast()
-
getWallOrDoor
public int getWallOrDoor()
-
getInteractType
public int getInteractType()
-
getMapSceneID
public int getMapSceneID()
-
getMiniMapIcon
public int getMiniMapIcon()
-
getModelSizeZ
public int getModelSizeZ()
-
getModelSizeX
public int getModelSizeX()
-
getModelSizeY
public int getModelSizeY()
-
getOffsetZ
public int getOffsetZ()
-
getOffsetX
public int getOffsetX()
-
getOffsetY
public int getOffsetY()
-
getVarpID
public int getVarpID()
-
getVarbitID
public int getVarbitID()
-
hasChildDefinitions
public boolean hasChildDefinitions()
-
isNonFlatShading
public boolean isNonFlatShading()
-
isBlocksProjectiles
public boolean isBlocksProjectiles()
-
isCastsShadows
public boolean isCastsShadows()
-
getWallThickness
public int getWallThickness()
-
getParams
public java.util.Map<java.lang.Integer,java.lang.Object> getParams()
-
getBlockingMask
@Deprecated public int getBlockingMask()
Deprecated.
-
isObstructsGround
public boolean isObstructsGround()
-
getSupportsItems
public int getSupportsItems()
-
getMapAreaId
public int getMapAreaId()
-
isRandomizeAnimationStart
public boolean isRandomizeAnimationStart()
-
getCurrentOrientation
public int getCurrentOrientation()
Returns the current orientation of an object based on its set flags and original orientation.- Returns:
- int value of current orientation
-
-