From 439ff92727699e4c04f6f509141c579089a11098 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 7 Sep 2018 13:33:51 -0700 Subject: [PATCH] crucial performance optimization --- src/main/java/baritone/pathing/goals/GoalGetToBlock.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/baritone/pathing/goals/GoalGetToBlock.java b/src/main/java/baritone/pathing/goals/GoalGetToBlock.java index bc32c5ca..30937772 100644 --- a/src/main/java/baritone/pathing/goals/GoalGetToBlock.java +++ b/src/main/java/baritone/pathing/goals/GoalGetToBlock.java @@ -47,11 +47,8 @@ public class GoalGetToBlock implements Goal { int xDiff = pos.getX() - this.x; int yDiff = pos.getY() - this.y; int zDiff = pos.getZ() - this.z; - if (yDiff == -2 && xDiff == 0 && zDiff == 0) { - return true; - } - if (yDiff == -1) { - yDiff = 0; + if (yDiff < 0) { + yDiff++; } return Math.abs(xDiff) + Math.abs(yDiff) + Math.abs(zDiff) <= 1; }