mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 03:57:35 +01:00
New pathfinder no longer considers diagonals
This commit is contained in:
parent
372ff072d7
commit
8ef0d56bb3
@ -66,8 +66,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
||||
double dY = vector.getY() - handle.locY;
|
||||
double xzDistance = dX * dX + dZ * dZ;
|
||||
double distance = xzDistance + dY * dY;
|
||||
if (distance > 0 && dY > 0 && xzDistance <= 4.205) {
|
||||
// 2.75 -> 4.205 (allow for diagonal jumping)
|
||||
if (distance > 0 && dY > 0 && xzDistance <= 2.75) {
|
||||
NMS.setShouldJump(npc.getBukkitEntity());
|
||||
}
|
||||
NMS.setDestination(npc.getBukkitEntity(), vector.getX(), vector.getY(), vector.getZ(), params.speed());
|
||||
|
Loading…
Reference in New Issue
Block a user