fix 2 block parkour failure on lilypads and after descends

This commit is contained in:
leijurv 2018-10-13 17:01:00 -07:00 committed by Leijurv
parent ba68990ef8
commit 897483884a
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -223,6 +223,14 @@ public class MovementParkour extends Movement {
}
}
}
if (dist == 3) { // this is a 2 block gap, dest = src + direction * 3
double xDiff = (src.x + 0.5) - player().posX;
double zDiff = (src.z + 0.5) - player().posZ;
double distFromStart = Math.max(Math.abs(xDiff), Math.abs(zDiff));
if (distFromStart < 0.7) {
return state;
}
}
state.setInput(InputOverrideHandler.Input.JUMP, true);
} else if (!playerFeet().equals(dest.offset(direction, -1))) {