Skip to content

Commit 1489b31

Browse files
committed
add mutable bv3 to queue instead i guess
1 parent 409459c commit 1489b31

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3644,10 +3644,12 @@ public Set<BlockVector3> getHollowed(Set<BlockVector3> vset) {
36443644
}
36453645

36463646
private void recurseHollow(Region region, BlockVector3 origin, Set<BlockVector3> outside, Mask mask) {
3647-
// FAWE start - use BlockVector3Set instead of LinkedList
3647+
// FAWE start - use BlockVector3Set instead of LinkedList & mutable BV3
36483648
final BlockVector3Set queue = BlockVector3Set.getAppropriateVectorSet(region);
36493649
queue.add(origin);
36503650

3651+
MutableBlockVector3 mutable = new MutableBlockVector3();
3652+
36513653
while (!queue.isEmpty()) {
36523654
Iterator<BlockVector3> iter = queue.iterator();
36533655
while (iter.hasNext()) {
@@ -3664,7 +3666,7 @@ private void recurseHollow(Region region, BlockVector3 origin, Set<BlockVector3>
36643666
}
36653667

36663668
for (BlockVector3 recurseDirection : recurseDirections) {
3667-
queue.add(current.toImmutable().add(recurseDirection));
3669+
queue.add(mutable.setComponents(current).add(recurseDirection));
36683670
}
36693671
}
36703672
}

0 commit comments

Comments
 (0)