crucial performance optimization

This commit is contained in:
Leijurv 2019-02-12 21:36:53 -08:00
parent 4026b850f8
commit 99cb7f5142
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 6 additions and 6 deletions

View File

@ -195,17 +195,17 @@ public class PathExecutor implements IPathExecutor, Helper {
continue;
}
Movement m = (Movement) path.movements().get(i);
HashSet<BlockPos> prevBreak = new HashSet<>(m.toBreak(bsi));
HashSet<BlockPos> prevPlace = new HashSet<>(m.toPlace(bsi));
HashSet<BlockPos> prevWalkInto = new HashSet<>(m.toWalkInto(bsi));
List<BlockPos> prevBreak = m.toBreak(bsi);
List<BlockPos> prevPlace = m.toPlace(bsi);
List<BlockPos> 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;
}
}