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 booleancanReach(Tile tile)Checks if this location is reachable by the provided tile without obstaclesdoubledistance()doubledistance(Tile tile)Distance (as the crow flies) away from the given tile.doubledistance(Entity entity)Distance away from the given entity.booleanexists()Determines where or not this object exists in game.java.lang.String[]getActions()intgetAdjustToTerrain()int[]getAlternativeIDs()intgetAnimationID()intgetAnimationObjectId()intgetBlockingMask()Deprecated.intgetBrightness()org.dreambot.internal.cache.wrappers.def.ObjectDefinitiongetComposite()intgetContrast()intgetCurrentOrientation()Returns the current orientation of an object based on its set flags and original orientation.abstract intgetFlags()intgetHeight()Gets the Tile 2D height of the object (furnace is 2x3, 3 is height)intgetId()Gets ID number of the given object.abstract longgetIndex()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)intgetInteractType()intgetLocalX()intgetLocalY()intgetMapAreaId()intgetMapSceneID()intgetMiniMapIcon()ModelgetModel()Gets the model of the entityshort[]getModelColors()intgetModelSizeX()intgetModelSizeY()intgetModelSizeZ()short[]getModifiedModelColors()java.lang.StringgetName()Gets the name of the entityint[]getObjectModelTypes()java.util.List<Tile>getObjectTiles()intgetOffsetX()intgetOffsetY()intgetOffsetZ()abstract intgetOrientation()java.util.Map<java.lang.Integer,java.lang.Object>getParams()abstract intgetPlane()intgetRealID()intgetRenderableHeight()Gets the model's heightshort[]getReTextureToFind()short[]getReTextureToReplace()intgetSupportsItems()java.util.List<Tile>getSurrounding()Gets the surrounding tiles (not including diagonals) around the GameObjectTilegetTile()Gets tile of the object.TileReferencegetTileReference()Gets tile reference of the given object.intgetVarbitID()intgetVarpID()intgetWallOrDoor()intgetWallThickness()intgetWidth()Gets the Tile 2D width of the object (furnace is 2x3, 2 is width)intgetX()Gets X coordinate of the given object.intgetY()Gets Y coordinate of the given object.intgetZ()Gets Z coordinate of the given object.booleanhasAction(java.lang.String... actions)Checks whether given actions are in the list of menu actions for an entitybooleanhasChildDefinitions()booleanisBlocksProjectiles()booleanisCastsShadows()booleanisImpenetrableSolid()booleanisNonFlatShading()booleanisObstructsGround()booleanisOccludes()booleanisRandomizeAnimationStart()voidsetTile(Tile t)inttileDistance(Tile tile)Distance (Chebyshev/Tchebychev) away from the given tile.java.lang.StringtoString()doublewalkingDistance(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
-
Methods inherited from interface org.dreambot.api.wrappers.interactive.Identifiable
getID
-
Methods inherited from interface org.dreambot.api.wrappers.interactive.Locatable
getGridX, getGridY, getRegionId
-
-
-
-
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()
-
getActions
public java.lang.String[] getActions()
- Specified by:
getActionsin classEntity
-
getObjectModelTypes
public int[] getObjectModelTypes()
-
getId
public int getId()
Description copied from interface:IdentifiableGets ID number of the given object.- Returns:
- the ID number as integer.
-
getX
public int getX()
Description copied from interface:LocatableGets X coordinate of the given object.- Returns:
- the X coordinate of the object.
-
getY
public int getY()
Description copied from interface:LocatableGets Y coordinate of the given object.- Returns:
- the Y coordinate of the object.
-
getZ
public int getZ()
Description copied from interface:LocatableGets 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:
getRenderableHeightin 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:EntityDistance away from the given entity.
-
distance
public double distance(Tile tile)
Description copied from interface:LocatableDistance (as the crow flies) away from the given tile.
-
walkingDistance
public double walkingDistance(Tile tile)
Description copied from interface:LocatableWalking 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:
walkingDistancein interfaceLocatable- Overrides:
walkingDistancein 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:LocatableDistance (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:EntityGets the name of the entity- Specified by:
getNamein interfaceIdentifiable- Specified by:
getNamein classEntity- Returns:
- name of entity
-
getOrientation
public abstract int getOrientation()
-
getTileReference
public TileReference getTileReference()
Description copied from interface:LocatableGets tile reference of the given object.- Specified by:
getTileReferencein interfaceLocatable- Overrides:
getTileReferencein classEntity- Returns:
- the object tile reference.
-
hasAction
public boolean hasAction(java.lang.String... actions)
Description copied from class:EntityChecks 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:VerifiedDetermines where or not this object exists in game.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
canReach
public boolean canReach(Tile tile)
Description copied from interface:LocatableChecks 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
-
getAnimationObjectId
public int getAnimationObjectId()
-
getIndex
public abstract long getIndex()
-
-