Interface Locatable

All Known Subinterfaces:
IActor, IDecorativeObject, IGameObject, IGroundObject, INPC, IPlayer, ITile, ITileItem, ITileObject, IWallObject, SceneEntity, TileEntity

public interface Locatable
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    distanceTo(net.runelite.api.coords.WorldPoint other)
     
    default int
     
    default float
    distanceTo2DHypotenuse(net.runelite.api.coords.WorldPoint target)
    Find the straight-line distance from this point to another point.
    default float
    distanceToHypotenuse(net.runelite.api.coords.WorldPoint target)
    Gets the straight-line distance between the origin point and the target point.
    net.runelite.api.coords.LocalPoint
     
    int
     
    net.runelite.api.coords.WorldPoint
     
    default int
     
    default int
     
  • Method Details

    • getWorldLocation

      net.runelite.api.coords.WorldPoint getWorldLocation()
    • getLocalLocation

      net.runelite.api.coords.LocalPoint getLocalLocation()
    • distanceTo

      default int distanceTo(Locatable other)
    • distanceTo

      default int distanceTo(net.runelite.api.coords.WorldPoint other)
    • distanceToHypotenuse

      default float distanceToHypotenuse(net.runelite.api.coords.WorldPoint target)
      Gets the straight-line distance between the origin point and the target point.

      If the target is not on the same plane, this method will return Float.MAX_VALUE. If ignoring the plane is wanted, use the distanceTo2DHypotenuse(WorldPoint) method.

      Parameters:
      target - worldpoint
      Returns:
      the straight-line distance
    • distanceTo2DHypotenuse

      default float distanceTo2DHypotenuse(net.runelite.api.coords.WorldPoint target)
      Find the straight-line distance from this point to another point.

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

      Parameters:
      target - worldpoint
      Returns:
      the straight-line distance
    • getWorldX

      default int getWorldX()
    • getWorldY

      default int getWorldY()
    • getPlane

      int getPlane()