Class DirectionalVisitor
java.lang.Object
com.sk89q.worldedit.function.visitor.BreadthFirstSearch
com.sk89q.worldedit.function.visitor.RecursiveVisitor
com.fastasyncworldedit.core.function.visitor.DirectionalVisitor
- All Implemented Interfaces:
Operation
Visits adjacent points on the same X-Z plane as long as the points
pass the given mask, and then executes the provided region
function on the entire column.
This is used by //fill
.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.function.visitor.BreadthFirstSearch
DEFAULT_DIRECTIONS, DIAGONAL_DIRECTIONS, maxY, minY
Fields inherited from interface com.sk89q.worldedit.function.operation.Operation
warnedDeprecatedClasses
-
Constructor Summary
ConstructorsConstructorDescriptionDirectionalVisitor
(Mask mask, RegionFunction function, BlockVector3 origin, BlockVector3 direction, int distance, int minY, int maxY) New visitor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isVisitable
(BlockVector3 from, BlockVector3 to) Return whether the given 'to' block should be visited, starting from the 'from' block.Methods inherited from class com.sk89q.worldedit.function.visitor.BreadthFirstSearch
addAxes, addDiagonal, cancel, getAffected, getDepth, getDirections, getStatusMessages, getVisited, isVisited, resume, setDirections, setDirections, setMaxBranch, setVisited, visit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.function.operation.Operation
addStatusMessages
-
Constructor Details
-
DirectionalVisitor
public DirectionalVisitor(Mask mask, RegionFunction function, BlockVector3 origin, BlockVector3 direction, int distance, int minY, int maxY) New visitor. Only visits in the given direction- Parameters:
mask
- block maskfunction
- function to applyorigin
- start positiondirection
- allowable direction to visit betweendistance
- max number of iterationsminY
- min visitable y value. Inclusive.maxY
- max visitable y value. Inclusive.
-
-
Method Details
-
isVisitable
Description copied from class:BreadthFirstSearch
Return whether the given 'to' block should be visited, starting from the 'from' block.- Overrides:
isVisitable
in classRecursiveVisitor
- Parameters:
from
- the origin blockto
- the block under question- Returns:
- true if the 'to' block should be visited
-