forked from RepoMirrors/baritone
crucial performance optimization
This commit is contained in:
parent
0d515b336f
commit
439ff92727
|
@ -47,11 +47,8 @@ public class GoalGetToBlock implements Goal {
|
||||||
int xDiff = pos.getX() - this.x;
|
int xDiff = pos.getX() - this.x;
|
||||||
int yDiff = pos.getY() - this.y;
|
int yDiff = pos.getY() - this.y;
|
||||||
int zDiff = pos.getZ() - this.z;
|
int zDiff = pos.getZ() - this.z;
|
||||||
if (yDiff == -2 && xDiff == 0 && zDiff == 0) {
|
if (yDiff < 0) {
|
||||||
return true;
|
yDiff++;
|
||||||
}
|
|
||||||
if (yDiff == -1) {
|
|
||||||
yDiff = 0;
|
|
||||||
}
|
}
|
||||||
return Math.abs(xDiff) + Math.abs(yDiff) + Math.abs(zDiff) <= 1;
|
return Math.abs(xDiff) + Math.abs(yDiff) + Math.abs(zDiff) <= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue