Package com.sk89q.worldedit.regions
Class AbstractRegion
java.lang.Object
com.sk89q.worldedit.regions.AbstractRegion
- All Implemented Interfaces:
Region
,Cloneable
,Iterable<BlockVector3>
- Direct Known Subclasses:
AbstractFlatRegion
,ConvexPolyhedralRegion
,CuboidRegion
,CylinderRegion
,EllipsoidRegion
,Polygonal2DRegion
,RegionIntersection
,TransformRegion
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Make a clone of 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.long
Get the number of blocks in the region.int
getWidth()
Get X-size.getWorld()
Sets the world that the selection is in.protected final int
protected final int
iterator()
Get the 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 java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.sk89q.worldedit.regions.Region
contains, contract, expand, getArea, getBoundingBox, getMaximumPoint, getMinimumPoint
-
Field Details
-
world
-
-
Constructor Details
-
AbstractRegion
-
-
Method Details
-
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. -
iterator
Get the iterator.- Specified by:
iterator
in interfaceIterable<BlockVector3>
- Returns:
- iterator of points inside the region
-
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. -
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
-
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.
-
getVolume
public long getVolume()Description copied from interface:Region
Get the number of blocks in the region. -
getWidth
public int getWidth()Get X-size. -
getHeight
public int getHeight()Get Y-size. -
getLength
public int getLength()Get Z-size. -
getChunks
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
-
getWorldMinY
protected final int getWorldMinY() -
getWorldMaxY
protected final int getWorldMaxY()
-