Class RequestSelection
java.lang.Object
com.sk89q.worldedit.session.request.RequestSelection
- All Implemented Interfaces:
IBatchProcessor
,Region
,Cloneable
,Iterable<BlockVector3>
A region that mirrors the current selection according to the current
LocalSession
and World
set on the current
Request
.
If a selection cannot be taken, then the selection will be assumed to be
that of a NullRegion
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Make a clone of the region.boolean
contains
(BlockVector3 position) Returns true based on whether the region contains the point.void
contract
(BlockVector3... changes) Contract the region.void
expand
(BlockVector3... changes) Expand the region.Get the center point of a region.Return a list of 16*16*16 chunks in a region.Get a list of chunks.int
Get Y-size.int
Get Z-size.Get the upper point of a region.Get the lower point of a region.protected Region
Get the delegate region.long
Get the number of blocks in the region.int
getWidth()
Get X-size.getWorld()
Sets the world that the selection is in.iterator()
polygonize
(int maxPoints) Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.void
Sets the world that the selection is in.void
shift
(BlockVector3 change) Shift the region.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, remove, trimNBT, trimNBT, trimY
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.sk89q.worldedit.regions.Region
construct, contains, contains, containsChunk, containsEntireCuboid, filter, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumY, getMinimumY, getScope, isGlobal, processSet, processSet
-
Constructor Details
-
RequestSelection
public RequestSelection()
-
-
Method Details
-
getRegion
Get the delegate region.- Returns:
- the delegate region
-
getMinimumPoint
Description copied from interface:Region
Get the lower point of a region.- Specified by:
getMinimumPoint
in interfaceRegion
- Returns:
- min. point
-
getMaximumPoint
Description copied from interface:Region
Get the upper point of a region.- Specified by:
getMaximumPoint
in interfaceRegion
- Returns:
- max. point
-
getCenter
Description copied from interface:Region
Get the center point of a region. Note: Coordinates will not be integers if the corresponding lengths are even. -
getVolume
public long getVolume()Description copied from interface:Region
Get the number of blocks in the region. -
getWidth
public int getWidth()Description copied from interface:Region
Get X-size. -
getHeight
public int getHeight()Description copied from interface:Region
Get Y-size. -
getLength
public int getLength()Description copied from interface:Region
Get Z-size. -
expand
Description copied from interface:Region
Expand the region.- Specified by:
expand
in interfaceRegion
- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
contract
Description copied from interface:Region
Contract the region.- Specified by:
contract
in interfaceRegion
- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
shift
Description copied from interface:Region
Shift the region.- Specified by:
shift
in interfaceRegion
- Parameters:
change
- the change- Throws:
RegionOperationException
- if the operation cannot be performed
-
contains
Description copied from interface:Region
Returns true based on whether the region contains the point. -
getChunks
Description copied from interface:Region
Get a list of chunks. -
getChunkCubes
Description copied from interface:Region
Return a list of 16*16*16 chunks in a region.- Specified by:
getChunkCubes
in interfaceRegion
- Returns:
- the chunk cubes this region overlaps with
-
getWorld
Description copied from interface:Region
Sets the world that the selection is in. -
setWorld
Description copied from interface:Region
Sets the world that the selection is in. -
clone
Description copied from interface:Region
Make a clone of the region. -
polygonize
Description copied from interface:Region
Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.- Specified by:
polygonize
in interfaceRegion
- Parameters:
maxPoints
- maximum number of points to generate. -1 for no limit.- Returns:
- the points.
-
iterator
- Specified by:
iterator
in interfaceIterable<BlockVector3>
-