public class GroundFunction extends Object implements LayerFunction
RegionFunction to the first ground block.| Constructor and Description |
|---|
GroundFunction(Mask mask,
RegionFunction function)
Create a new ground function.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(Vector position,
int depth)
Apply the function to the given position.
|
int |
getAffected()
Get the number of affected objects.
|
Mask |
getMask()
Get the mask that determines what the ground consists of.
|
boolean |
isGround(Vector position)
Returns whether the given block should be "passed through" when
conducting the ground search.
|
void |
setMask(Mask mask)
Set the mask that determines what the ground consists of.
|
public GroundFunction(Mask mask, RegionFunction function)
mask - a maskfunction - the function to applypublic Mask getMask()
public void setMask(Mask mask)
mask - a maskpublic int getAffected()
public boolean isGround(Vector position)
LayerFunctionisGround in interface LayerFunctionposition - return whether the given block is the groundpublic boolean apply(Vector position, int depth) throws WorldEditException
LayerFunctionThe depth would be the number of blocks from the surface if
a LayerVisitor was used.
apply in interface LayerFunctionposition - the positiondepth - the depth as a number starting from 0WorldEditException - thrown on an errorCopyright © 2010-2014. All Rights Reserved.