Interface Positionable

    • Method Detail

      • getPlane

        int getPlane()
      • getWorldX

        int getWorldX()
      • getWorldY

        int getWorldY()
      • getSceneX

        default int getSceneX()
      • getSceneY

        default int getSceneY()
      • getLocalX

        default int getLocalX()
      • getLocalY

        default int getLocalY()
      • getRegionX

        default int getRegionX()
      • getRegionY

        default int getRegionY()
      • getRegionId

        default int getRegionId()
      • getWidth

        default int getWidth()
      • getHeight

        default int getHeight()
      • isInScene

        default boolean isInScene()
      • getRectArea

        default RectArea getRectArea()
      • getSurroundingArea

        default RectArea getSurroundingArea​(int radius)
      • getWorldTile

        default WorldTile getWorldTile()
      • getSceneTile

        default SceneTile getSceneTile()
      • getLocalTile

        default LocalTile getLocalTile()
      • getRegionTile

        default RegionTile getRegionTile()
      • locatedAt

        default boolean locatedAt​(Positionable positionable)
      • isInMeleeDistance

        default boolean isInMeleeDistance​(Positionable positionable)
      • isInArea

        default boolean isInArea​(RectArea area)
        Checks whether this tile is located within the given area.
        Parameters:
        area - area to check within
        Returns:
        true if area contains this point, false otherwise.
      • isInArea

        default boolean isInArea​(RectArea... areas)
        Checks whether this tile is located within any of the given areas.
        Parameters:
        areas - areas to check within
        Returns:
        true if any area contains this point, false otherwise.
      • isInArea2D

        default boolean isInArea2D​(RectArea area)
        Checks whether this tile is located within the given area, disregarding any plane differences.
        Parameters:
        area - area to check within
        Returns:
        true if area contains this point, false otherwise.
      • isInArea2D

        default boolean isInArea2D​(RectArea... areas)
        Checks whether this tile is located within any of the given areas, disregarding any plane differences.
        Parameters:
        areas - areas to check within
        Returns:
        true if any area contains this point, false otherwise.
      • distance

        default double distance()
        Gets the distance between this positionable and the local player.

        This method disregards the plane value of this positionable and the local player and returns the simple distance between the X-Z coordinate pairs. same as distanceTo2DHypotenuse(Positionable)

      • distance

        default double distance​(Positionable other)
        Find the straight-line distance from this positionable to another positionable.

        This method disregards the plane value of the two positionable and returns the simple distance between the X-Z coordinate pairs. same as distanceTo2DHypotenuse(Positionable)

        Parameters:
        other - other tile
        Returns:
        the straight-line distance
      • distanceTo

        default int distanceTo​(Positionable other)
        Gets the distance between this positionable and another.

        If the other positionable is not on the same plane, this method will return Integer.MAX_VALUE. If ignoring the plane is wanted, use the distanceTo2D(Positionable) method.

        Parameters:
        other - other positionable
        Returns:
        the distance
      • distanceTo2D

        default int distanceTo2D​(Positionable other)
        Find the distance from this positionable to another positionable.

        This method disregards the plane value of the two positionable and returns the simple distance between the X-Z coordinate pairs.

        Parameters:
        other - other positionable
        Returns:
        the distance
      • distanceToHypotenuse

        default double distanceToHypotenuse​(Positionable other)
        Gets the straight-line distance between this positionable and another.

        If the other positionable is not on the same plane, this method will return Double.MAX_VALUE. If ignoring the plane is wanted, use the distanceTo2DHypotenuse(Positionable) method.

        Parameters:
        other - other positionable
        Returns:
        the straight-line distance
      • distanceTo2DHypotenuse

        default double distanceTo2DHypotenuse​(Positionable other)
        Find the straight-line distance from this positionable to another positionable.

        This method disregards the plane value of the two positionable and returns the simple distance between the X-Z coordinate pairs.

        Parameters:
        other - other tile
        Returns:
        the straight-line distance
      • isUnderRoof

        default boolean isUnderRoof()
      • getMovementFlags

        default java.util.Set<MovementFlag> getMovementFlags()
      • GetChunkRotation

        default int GetChunkRotation()
      • inLineOfSight

        default boolean inLineOfSight()
        Checks if this positionable is in the line of sight of the local player.
        Returns:
        true if this positionable is in the line of sight of the local player, false otherwise
      • hasLineOfSightTo

        default boolean hasLineOfSightTo()
        Checks if this positionable has line of sight to the local player.
        Returns:
        true if this positionable has line of sight to the local player, false otherwise
      • hasLineOfSightTo

        default boolean hasLineOfSightTo​(Positionable other)
        Checks if this positionable has line of sight to another positionable.
        Parameters:
        other - the other positionable
        Returns:
        true if this positionable has line of sight to the other positionable, false otherwise
      • getMinimapPoint

        default net.eternalclient.api.data.Point getMinimapPoint()
      • getCanvasTilePoly

        default java.awt.Polygon getCanvasTilePoly()
      • getCanvasTextLocation

        default net.eternalclient.api.data.Point getCanvasTextLocation​(java.awt.Graphics2D gg,
                                                                       java.lang.String text,
                                                                       int zOffset)
      • draw

        default void draw​(java.awt.Graphics2D gg,
                          java.awt.Color color)
      • drawText

        default void drawText​(java.awt.Graphics2D gg,
                              java.lang.String text,
                              int zOffset)
      • drawMinimapDot

        default void drawMinimapDot​(java.awt.Graphics2D gg,
                                    java.awt.Color color)
      • getWalkableTile

        default Positionable getWalkableTile​(int radius)
        Gets a walkable tile within a certain radius of this positionable.

        This is only within the loaded Scene.

        Parameters:
        radius - The radius to search for a walkable tile.
        Returns:
        Returns the walkable tile or null if none found or this positionable is not in the scene.
      • walkingDistance

        default int walkingDistance()
      • canReach

        default boolean canReach()
      • canReach

        default boolean canReach​(Positionable positionable)
      • canReachSurrounding

        default boolean canReachSurrounding()
      • canReachSurrounding

        default boolean canReachSurrounding​(Positionable positionable)
      • distanceToPath

        default int distanceToPath​(Positionable other)
        Gets the path distance from this position to another.

        If the other point is unreachable, this method will return Integer.MAX_VALUE.

        Parameters:
        other -
        Returns:
        Returns the path distance
      • pathTo

        default java.util.List<Positionable> pathTo​(Positionable other)
        Determine the checkpoint tiles of a server-sided path from this Positionable to another Positionable.

        The checkpoint tiles of a path are the "corner tiles" of a path and determine the path completely.

        Note that true server-sided pathfinding uses collisiondata of the 128x128 area around this Positionable, while the client only has access to collisiondata within the 104x104 loaded area. This means that the results would differ in case the server's path goes near (or over) the border of the loaded area.

        Parameters:
        other - The other WorldTile to compare with
        Returns:
        Returns the checkpoint tiles of the path