Package com.sk89q.worldedit.function
Interface LayerFunction
- All Known Implementing Classes:
GroundFunction
,Naturalizer
,SnowSimulator
public interface LayerFunction
A function that takes a position and a depth.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(BlockVector3 position, int depth) Apply the function to the given position.boolean
isGround
(BlockVector3 position) Returns whether the given block should be "passed through" when conducting the ground search.
-
Method Details
-
isGround
Returns whether the given block should be "passed through" when conducting the ground search.- Parameters:
position
- return whether the given block is the ground- Returns:
- true if the search should stop
-
apply
Apply the function to the given position.The depth would be the number of blocks from the surface if a
LayerVisitor
was used.- Parameters:
position
- the positiondepth
- the depth as a number starting from 0- Returns:
- true whether this method should be called for further layers
- Throws:
WorldEditException
- thrown on an error
-