From 99cb7f51422370e395f2eeb8e91eef1e56d1cd6d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 12 Feb 2019 21:36:53 -0800 Subject: [PATCH] crucial performance optimization --- .../java/baritone/pathing/path/PathExecutor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index fffae13f..c61ebc3d 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -195,17 +195,17 @@ public class PathExecutor implements IPathExecutor, Helper { continue; } Movement m = (Movement) path.movements().get(i); - HashSet prevBreak = new HashSet<>(m.toBreak(bsi)); - HashSet prevPlace = new HashSet<>(m.toPlace(bsi)); - HashSet prevWalkInto = new HashSet<>(m.toWalkInto(bsi)); + List prevBreak = m.toBreak(bsi); + List prevPlace = m.toPlace(bsi); + List prevWalkInto = m.toWalkInto(bsi); m.resetBlockCache(); - if (!prevBreak.equals(new HashSet<>(m.toBreak(bsi)))) { + if (!prevBreak.equals(m.toBreak(bsi))) { recalcBP = true; } - if (!prevPlace.equals(new HashSet<>(m.toPlace(bsi)))) { + if (!prevPlace.equals(m.toPlace(bsi))) { recalcBP = true; } - if (!prevWalkInto.equals(new HashSet<>(m.toWalkInto(bsi)))) { + if (!prevWalkInto.equals(m.toWalkInto(bsi))) { recalcBP = true; } }