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

Dieser Commit ist enthalten in:
Jordan 2022-06-21 12:56:02 +01:00 committet von GitHub
Ursprung 3f103eea9b
Commit c5073d79e7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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();

Datei anzeigen

@ -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 {

Datei anzeigen

@ -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;