Class RegionOffset
java.lang.Object
com.sk89q.worldedit.function.util.RegionOffset
- All Implemented Interfaces:
Filter, RegionFunction
Offsets the position parameter by adding a given offset vector.
-
Constructor Summary
ConstructorsConstructorDescriptionRegionOffset(BlockVector3 offset, RegionFunction function) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(BlockVector3 position) Apply the function to the given position.Get the offset that is added to the position.voidsetOffset(BlockVector3 offset) Set the offset that is added to the position.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Filter
applyChunk, finish, finishChunk, fork, joinMethods inherited from interface RegionFunction
applyBlock
-
Constructor Details
-
RegionOffset
Create a new instance.- Parameters:
offset- the offsetfunction- the function that is called with the offset position
-
-
Method Details
-
getOffset
-
setOffset
Set the offset that is added to the position.- Parameters:
offset- the offset
-
apply
Description copied from interface:RegionFunctionApply the function to the given position.- Specified by:
applyin interfaceRegionFunction- Parameters:
position- the position- Returns:
- true if something was changed
- Throws:
WorldEditException- thrown on an error
-