From 245b2483ab1fac0ad86dfb870762d5ef667db678 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 5 Dec 2018 18:01:23 -0800 Subject: [PATCH] fix crash when path length is exactly 30 --- src/main/java/baritone/utils/pathing/PathBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/pathing/PathBase.java b/src/main/java/baritone/utils/pathing/PathBase.java index 129e0735..3fbc95ca 100644 --- a/src/main/java/baritone/utils/pathing/PathBase.java +++ b/src/main/java/baritone/utils/pathing/PathBase.java @@ -47,7 +47,7 @@ public abstract class PathBase implements IPath { return this; } double factor = BaritoneAPI.getSettings().pathCutoffFactor.get(); - int newLength = (int) ((length() - 1 - min) * factor) + min; + int newLength = (int) ((length() - min) * factor) + min - 1; return new CutoffPath(this, newLength); } }