WorldPoint
A tile in the game world: X, Y and plane.
Final classRuneLiteRuneLite docs
public final class WorldPointThe plane is the floor: 0 is the ground floor. Turn on Location in RuneLite's Developer Tools to see the coordinates of your tile.
Example
WorldPoint bankChest = new WorldPoint(3094, 3491, 0);
int tiles = PlayerEx.getLocal().getWorldPoint().distanceTo(bankChest);Members
Constructors
- newWorldPoint(int, int, int)
Creates a point.
Methods
- intdistanceTo(WorldPoint)
The distance in tiles to another point.
- intgetPlane()
The floor.
- intgetX()
The world X coordinate.
- intgetY()
The world Y coordinate.
WorldPoint(int, int, int)
public WorldPoint(int x, int y, int plane)Creates a point.
Parameters
x- World X coordinate.
y- World Y coordinate.
plane- The floor, from
0to3.
distanceTo(WorldPoint)
public int distanceTo(WorldPoint other)The distance in tiles to another point.
Takes the larger of the X and Y differences, so a diagonal step counts as one tile.
Parameters
other- The other point.
Returns
The distance, or 2147483647 (the largest int) when the points are on different planes.
getPlane()
public int getPlane()The floor.
Returns
From 0 to 3.
getX()
public int getX()The world X coordinate.
Returns
X, growing to the east.
getY()
public int getY()The world Y coordinate.
Returns
Y, growing to the north.
Also allowed
These work as in the RuneLite docs.
clone, distanceTo, distanceTo2D, dx, dy, dz, equals, fromCoord, fromLocal, fromLocalInstance, fromRegion, fromScene, getMirrorPoint, getRegionID, getRegionX, getRegionY, hashCode, isInArea, isInArea2D, isInScene, toLocalInstance, toString, toWorldArea