SafespotPlan
Immutable PvP safespot snapshot for the focused player target.
Final classRLPlugins API
public final class SafespotPlanThe plan contains the two safespot buckets from the original PK API, plus the closest reachable safespot and closest visible attack tile for immediate decision-making. All coordinates are copied values and can safely leave the client thread.
Members
Constructors
- new
Methods
- booleanequals(Object)
Whether this and the other object are the same thing.
- List<WorldPoint>getAllSafeSpots()
Returns all safespot tiles from both buckets.
- WorldPointgetClosestAttackTile()
Closest tile from which the local player can attack the focused target.
- WorldPointgetClosestSafeSpotTile()
Closest reachable safespot to the local player.
- WorldPointgetLocalTile()
Local player's tile when this safespot snapshot was built.
- List<WorldPoint>getSafeSpots0To10()
Safespot tiles at distance
0..10from the target. - List<WorldPoint>getSafeSpots10Plus()
Safespot tiles at distance
11+from the target within the search radius. - WorldPointgetSafespotTile()
Compatibility alias for consumers that expect a generic plan tile.
- intgetSnapshotTick()
Game tick used to build this plan.
- WorldPointgetTargetTile()
Focused target's tile when this safespot snapshot was built.
- inthashCode()
A number Java uses when this is put in a set or a map.
- booleanhasSafeSpots()
Returns whether any safespot tile was found.
- booleanisTargetFrozen()
Returns whether the focused target was frozen in the timing snapshot used for this safespot query.
SafespotPlan(WorldPoint, WorldPoint, List<WorldPoint>, List<WorldPoint>, WorldPoint, WorldPoint, boolean, int)
public SafespotPlan(WorldPoint localTile, WorldPoint targetTile, List<WorldPoint> safeSpots0To10, List<WorldPoint> safeSpots10Plus, WorldPoint closestSafeSpotTile, WorldPoint closestAttackTile, boolean targetFrozen, int snapshotTick)Creates a SafespotPlan.
Parameters
localTile- Local tile.
targetTile- Target tile.
safeSpots0To10- Safe spots0 to10.
safeSpots10Plus- Safe spots10 plus.
closestSafeSpotTile- Closest safe spot tile.
closestAttackTile- Closest attack tile.
targetFrozen- Target frozen.
snapshotTick- Snapshot tick.
equals(Object)
public boolean equals(Object o)Whether this and the other object are the same thing.
Parameters
o- O.
getAllSafeSpots()
public List<WorldPoint> getAllSafeSpots()Returns all safespot tiles from both buckets.
Returns
Immutable combined safespot list.
getClosestAttackTile()
public WorldPoint getClosestAttackTile()Closest tile from which the local player can attack the focused target.
Returns
Closest attack tile, or null when no visible attack tile is found within the search radius.
getClosestSafeSpotTile()
public WorldPoint getClosestSafeSpotTile()Closest reachable safespot to the local player.
Returns
Closest safespot tile, or null when none is reachable.
getLocalTile()
public WorldPoint getLocalTile()Local player's tile when this safespot snapshot was built.
Returns
Local tile, or null when unavailable.
getSafeSpots0To10()
public List<WorldPoint> getSafeSpots0To10()Safespot tiles at distance 0..10 from the target.
A tile is included when it is walkable and the target does not have line of sight to it. When enabled in SafespotOptions, the target's own tile is also included while the target is frozen.
Returns
Immutable list of close safespots.
getSafeSpots10Plus()
public List<WorldPoint> getSafeSpots10Plus()Safespot tiles at distance 11+ from the target within the search radius.
Returns
Immutable list of long-distance safespots.
getSafespotTile()
public WorldPoint getSafespotTile()Compatibility alias for consumers that expect a generic plan tile.
Returns
Closest safespot tile, or null.
getSnapshotTick()
public int getSnapshotTick()Game tick used to build this plan.
Returns
Snapshot tick.
getTargetTile()
public WorldPoint getTargetTile()Focused target's tile when this safespot snapshot was built.
Returns
Target tile.
hashCode()
public int hashCode()A number Java uses when this is put in a set or a map.
hasSafeSpots()
public boolean hasSafeSpots()Returns whether any safespot tile was found.
Returns
true when either safespot bucket has at least one tile.
isTargetFrozen()
public boolean isTargetFrozen()Returns whether the focused target was frozen in the timing snapshot used for this safespot query.
Returns
true when target freeze ticks were active.
Also allowed
Every class has these, as in plain Java.
toString