Interface CollisionMap
- All Known Implementing Classes:
GlobalCollisionMap,LocalCollisionMap
public interface CollisionMap
Interface for querying tile collision data used in pathfinding.
CollisionMap provides methods to check whether movement is possible between adjacent tiles in any cardinal or diagonal direction. This is the foundation of the pathfinding system, determining which tiles are walkable.
Direction Methods
Each direction method returns true if movement is ALLOWED in that direction:
n(int, int, int)- Can move North (y+1)s(int, int, int)- Can move South (y-1)e(int, int, int)- Can move East (x+1)w(int, int, int)- Can move West (x-1)ne(int, int, int)- Can move Northeast (diagonal)nw(int, int, int)- Can move Northwest (diagonal)se(int, int, int)- Can move Southeast (diagonal)sw(int, int, int)- Can move Southwest (diagonal)
Diagonal Movement
Diagonal movement is only allowed if both the diagonal path AND the two adjacent cardinal paths are clear. For example, moving Northeast requires that North, East, and the diagonal tile itself are all accessible.
Implementation Classes
GlobalCollisionMap- Pre-computed collision data for the entire game worldLocalCollisionMap- Real-time collision data from the current scene
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleane(int x, int y, int z) Checks if movement East (x+1) is allowed from the specified position.default booleane(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement East is allowed from the specified world point.default booleanfullBlock(int x, int y, int z) Checks if a tile is fully blocked (like game objects that occupy the entire tile).default booleanfullBlock(net.runelite.api.coords.WorldPoint worldPoint) Checks if a tile is fully blocked at the specified world point.booleann(int x, int y, int z) Checks if movement North (y+1) is allowed from the specified position.default booleann(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement North is allowed from the specified world point.default booleanne(int x, int y, int z) Checks if diagonal movement Northeast is allowed from the specified position.default booleanne(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Northeast is allowed from the specified world point.default booleannw(int x, int y, int z) Checks if diagonal movement Northwest is allowed from the specified position.default booleannw(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Northwest is allowed from the specified world point.default booleans(int x, int y, int z) Checks if movement South (y-1) is allowed from the specified position.default booleans(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement South is allowed from the specified world point.default booleanse(int x, int y, int z) Checks if diagonal movement Southeast is allowed from the specified position.default booleanse(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Southeast is allowed from the specified world point.default booleansw(int x, int y, int z) Checks if diagonal movement Southwest is allowed from the specified position.default booleansw(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Southwest is allowed from the specified world point.default booleanw(int x, int y, int z) Checks if movement West (x-1) is allowed from the specified position.default booleanw(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement West is allowed from the specified world point.
-
Method Details
-
n
boolean n(int x, int y, int z) Checks if movement North (y+1) is allowed from the specified position.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if movement North is allowed
-
e
boolean e(int x, int y, int z) Checks if movement East (x+1) is allowed from the specified position.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if movement East is allowed
-
s
default boolean s(int x, int y, int z) Checks if movement South (y-1) is allowed from the specified position. Implemented by checking if North is allowed from the southern tile.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if movement South is allowed
-
w
default boolean w(int x, int y, int z) Checks if movement West (x-1) is allowed from the specified position. Implemented by checking if East is allowed from the western tile.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if movement West is allowed
-
ne
default boolean ne(int x, int y, int z) Checks if diagonal movement Northeast is allowed from the specified position. Requires North, East, and both intermediate paths to be clear.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if diagonal movement Northeast is allowed
-
nw
default boolean nw(int x, int y, int z) Checks if diagonal movement Northwest is allowed from the specified position. Requires North, West, and both intermediate paths to be clear.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if diagonal movement Northwest is allowed
-
se
default boolean se(int x, int y, int z) Checks if diagonal movement Southeast is allowed from the specified position. Requires South, East, and both intermediate paths to be clear.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if diagonal movement Southeast is allowed
-
sw
default boolean sw(int x, int y, int z) Checks if diagonal movement Southwest is allowed from the specified position. Requires South, West, and both intermediate paths to be clear.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if diagonal movement Southwest is allowed
-
fullBlock
default boolean fullBlock(int x, int y, int z) Checks if a tile is fully blocked (like game objects that occupy the entire tile). A tile is fully blocked if movement is not allowed in any cardinal direction.- Parameters:
x- the x coordinatey- the y coordinatez- the plane/level- Returns:
- true if the tile is fully blocked
-
n
default boolean n(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement North is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if movement North is allowed
-
s
default boolean s(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement South is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if movement South is allowed
-
w
default boolean w(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement West is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if movement West is allowed
-
e
default boolean e(net.runelite.api.coords.WorldPoint worldPoint) Checks if movement East is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if movement East is allowed
-
ne
default boolean ne(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Northeast is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if diagonal movement Northeast is allowed
-
nw
default boolean nw(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Northwest is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if diagonal movement Northwest is allowed
-
se
default boolean se(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Southeast is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if diagonal movement Southeast is allowed
-
sw
default boolean sw(net.runelite.api.coords.WorldPoint worldPoint) Checks if diagonal movement Southwest is allowed from the specified world point.- Parameters:
worldPoint- the world point to check from- Returns:
- true if diagonal movement Southwest is allowed
-
fullBlock
default boolean fullBlock(net.runelite.api.coords.WorldPoint worldPoint) Checks if a tile is fully blocked at the specified world point.- Parameters:
worldPoint- the world point to check- Returns:
- true if the tile is fully blocked in all cardinal directions
-