New pathfinder no longer considers diagonals

This commit is contained in:
fullwall 2013-09-01 21:47:38 +08:00
parent 372ff072d7
commit 8ef0d56bb3

View File

@ -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());