public class FlatRegionOffset extends java.lang.Object implements FlatRegionFunction
Constructor and Description |
---|
FlatRegionOffset(BlockVector2 offset,
FlatRegionFunction function)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(BlockVector2 position)
Apply the function to the given position.
|
BlockVector2 |
getOffset()
Get the offset that is added to the position.
|
void |
setOffset(BlockVector2 offset)
Set the offset that is added to the position.
|
public FlatRegionOffset(BlockVector2 offset, FlatRegionFunction function)
offset
- the offsetfunction
- the function that is called with the offset positionpublic BlockVector2 getOffset()
public void setOffset(BlockVector2 offset)
offset
- the offsetpublic boolean apply(BlockVector2 position) throws WorldEditException
FlatRegionFunction
apply
in interface FlatRegionFunction
position
- the positionWorldEditException
- thrown on an error