Class FlatRegionOffset
java.lang.Object
com.sk89q.worldedit.function.util.FlatRegionOffset
- All Implemented Interfaces:
FlatRegionFunction
Offsets the position parameter by adding a given offset vector.
-
Constructor Summary
ConstructorDescriptionFlatRegionOffset
(BlockVector2 offset, FlatRegionFunction function) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(BlockVector2 position) Apply the function to the given position.Get the offset that is added to the position.void
setOffset
(BlockVector2 offset) Set the offset that is added to the position.
-
Constructor Details
-
FlatRegionOffset
Create a new instance.- Parameters:
offset
- the offsetfunction
- the function that is called with the offset position
-
-
Method Details
-
getOffset
Get the offset that is added to the position.- Returns:
- the offset
-
setOffset
Set the offset that is added to the position.- Parameters:
offset
- the offset
-
apply
Description copied from interface:FlatRegionFunction
Apply the function to the given position.- Specified by:
apply
in interfaceFlatRegionFunction
- Parameters:
position
- the position- Returns:
- true if something was changed
- Throws:
WorldEditException
- thrown on an error
-