Account for use of MutableBlockVector3 in Spline Brush (#1831)

This commit is contained in:
Jordan 2022-06-21 12:56:02 +01:00 committed by GitHub
parent 3f103eea9b
commit c5073d79e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public class SplineBrush implements Brush, ResettableTool {
final ArrayList<BlockVector3> points = new ArrayList<>();
if (size > 0) {
DFSRecursiveVisitor visitor = new DFSRecursiveVisitor(mask, p -> {
points.add(p);
points.add(p.toImmutable());
return true;
}, (int) size, 1);
List<BlockVector3> directions = visitor.getDirections();

View File

@ -7,8 +7,8 @@ import com.sk89q.worldedit.math.BlockVector3;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An implementation of an {@link com.sk89q.worldedit.function.visitor.BreadthFirstSearch} that uses
* a mask to determine where a block should be visited.
* An implementation of an {@link DFSVisitor} that uses a mask to determine where a block should be visited. The visit is
* performed using a {@link com.fastasyncworldedit.core.math.MutableBlockVector3}
*/
public class DFSRecursiveVisitor extends DFSVisitor {

View File

@ -21,6 +21,9 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Depth-first-search visitor. The visit is performed using a {@link com.fastasyncworldedit.core.math.MutableBlockVector3}
*/
public abstract class DFSVisitor implements Operation {
private final RegionFunction function;