Class GameObject

    • Method Detail

      • getTile

        public Tile getTile()
        Description copied from interface: Locatable
        Gets tile of the object.
        Specified by:
        getTile in interface Locatable
        Overrides:
        getTile in class Entity
        Returns:
        the object tile.
      • 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 class Entity
      • 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 class Entity
        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()
        Overrides:
        distance in class Entity
      • distance

        public double distance​(Entity entity)
        Description copied from class: Entity
        Distance away from the given entity.
        Overrides:
        distance in class Entity
        Parameters:
        entity - the destination target.
        Returns:
        return the distance from the given entities tile as a double.
      • distance

        public double distance​(Tile tile)
        Description copied from interface: Locatable
        Distance (as the crow flies) away from the given tile.
        Specified by:
        distance in interface Locatable
        Overrides:
        distance in class Entity
        Parameters:
        tile - the destination tile.
        Returns:
        return the distance from the given tile as a double.
      • 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 interface Locatable
        Overrides:
        walkingDistance in class Entity
        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 from Locatable.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 interface Identifiable
        Specified by:
        getName in class Entity
        Returns:
        name of entity
      • getOrientation

        public abstract int getOrientation()
      • 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
        Specified by:
        hasAction in class Entity
        Parameters:
        actions - actions to check
        Returns:
        true if all actions are in the list of menu actions
      • getModel

        public Model getModel()
        Description copied from class: Entity
        Gets the model of the entity
        Overrides:
        getModel in class Entity
        Returns:
        model of 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.
        Specified by:
        exists in interface Verified
        Overrides:
        exists in class Entity
        Returns:
        true, if the object exist, otherwise false.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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