Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3298,7 +3298,9 @@ public int hollowOutRegion(Region region, int thickness, Pattern pattern, Mask m
outer:
for (BlockVector3 position : region) {
for (BlockVector3 recurseDirection : recurseDirections) {
BlockVector3 neighbor = position.add(recurseDirection);
//FAWE start - mutable
BlockVector3 neighbor = mutable.setComponents(position).add(recurseDirection);
Comment thread
dordsor21 marked this conversation as resolved.
//FAWE end

if (outside.contains(neighbor)) {
newOutside.add(position);
Expand All @@ -3313,7 +3315,9 @@ public int hollowOutRegion(Region region, int thickness, Pattern pattern, Mask m
outer:
for (BlockVector3 position : region) {
for (BlockVector3 recurseDirection : recurseDirections) {
BlockVector3 neighbor = position.add(recurseDirection);
//FAWE start - mutable
BlockVector3 neighbor = mutable.setComponents(position).add(recurseDirection);
//FAWE end

if (outside.contains(neighbor)) {
continue outer;
Expand Down Expand Up @@ -3644,10 +3648,12 @@ public Set<BlockVector3> getHollowed(Set<BlockVector3> vset) {
}

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

MutableBlockVector3 mutable = new MutableBlockVector3();

while (!queue.isEmpty()) {
Iterator<BlockVector3> iter = queue.iterator();
while (iter.hasNext()) {
Expand All @@ -3664,7 +3670,7 @@ private void recurseHollow(Region region, BlockVector3 origin, Set<BlockVector3>
}

for (BlockVector3 recurseDirection : recurseDirections) {
queue.add(current.add(recurseDirection));
queue.add(mutable.setComponents(current).add(recurseDirection));
}
}
}
Expand Down
Loading