Class RecursiveVisitor
java.lang.Object
com.sk89q.worldedit.function.visitor.BreadthFirstSearch
com.sk89q.worldedit.function.visitor.RecursiveVisitor
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
AboveVisitor
,DirectionalVisitor
,DownwardVisitor
,NonRisingVisitor
An implementation of an
BreadthFirstSearch
that uses a mask to
determine where a block should be visited.-
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
ConstructorsConstructorDescriptionRecursiveVisitor
(Mask mask, RegionFunction function) Create a new recursive visitor.RecursiveVisitor
(Mask mask, RegionFunction function, int maxDepth, int minY, int maxY) Create a new recursive visitor.RecursiveVisitor
(Mask mask, RegionFunction function, int maxDepth, int minY, int maxY, Extent extent) Create a new recursive visitor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
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
-
RecursiveVisitor
Create a new recursive visitor.- Parameters:
mask
- the maskfunction
- the function
-
RecursiveVisitor
Create a new recursive visitor.- Parameters:
mask
- the maskfunction
- the functionmaxDepth
- the maximum number of iterationsminY
- minimum allowable y to visit. Inclusive.maxY
- maximum allowable y to visit. Inclusive.
-
RecursiveVisitor
public RecursiveVisitor(Mask mask, RegionFunction function, int maxDepth, int minY, int maxY, Extent extent) Create a new recursive visitor.- Parameters:
mask
- the maskfunction
- the functionmaxDepth
- the maximum number of iterationsminY
- minimum allowable y to visit. Inclusive.maxY
- maximum allowable y to visit. Inclusive.extent
- the extent for preloading
-
-
Method Details
-
isVisitable
Description copied from class:BreadthFirstSearch
Return whether the given 'to' block should be visited, starting from the 'from' block.- Specified by:
isVisitable
in classBreadthFirstSearch
- Parameters:
from
- the origin blockto
- the block under question- Returns:
- true if the 'to' block should be visited
-