From cf2765e017d218a465c29901806647ed6439dbcb Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 25 Nov 2018 22:57:54 -0800 Subject: [PATCH] thousands here too, on long paths --- src/api/java/baritone/api/pathing/calc/IPath.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/java/baritone/api/pathing/calc/IPath.java b/src/api/java/baritone/api/pathing/calc/IPath.java index 133de5ef..8f0cb68e 100644 --- a/src/api/java/baritone/api/pathing/calc/IPath.java +++ b/src/api/java/baritone/api/pathing/calc/IPath.java @@ -109,8 +109,9 @@ public interface IPath { default double ticksRemainingFrom(int pathPosition) { double sum = 0; //this is fast because we aren't requesting recalculation, it's just cached - for (int i = pathPosition; i < movements().size(); i++) { - sum += movements().get(i).getCost(); + List movements = movements(); + for (int i = pathPosition; i < movements.size(); i++) { + sum += movements.get(i).getCost(); } return sum; }