Package com.sk89q.worldedit.regions
Class AbstractRegion
- All Implemented Interfaces:
IBatchProcessor
,Region
,Cloneable
,Iterable<BlockVector3>
,Collection<BlockVector3>
,Set<BlockVector3>
- Direct Known Subclasses:
AbstractFlatRegion
,BlockSet
,ConvexPolyhedralRegion
,CuboidRegion
,CylinderRegion
,EllipsoidRegion
,FuzzyRegion
,Polygonal2DRegion
,PolyhedralRegion
,RegionIntersection
,TransformRegion
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Make a clone of the region.boolean
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
int
hashCode()
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.int
size()
Methods inherited from class java.util.AbstractSet
removeAll
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, remove, trimNBT, trimNBT, trimY
Methods inherited from interface com.sk89q.worldedit.regions.Region
construct, contains, contains, contains, containsChunk, containsEntireCuboid, contract, expand, filter, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumPoint, getMaximumY, getMinimumPoint, getMinimumY, getScope, isGlobal, processSet, processSet
-
Field Details
-
world
-
-
Constructor Details
-
AbstractRegion
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceCollection<BlockVector3>
- Specified by:
size
in interfaceSet<BlockVector3>
- Specified by:
size
in classAbstractCollection<BlockVector3>
-
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 interfaceCollection<BlockVector3>
- Specified by:
iterator
in interfaceIterable<BlockVector3>
- Specified by:
iterator
in interfaceSet<BlockVector3>
- Specified by:
iterator
in classAbstractCollection<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() -
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<BlockVector3>
- Specified by:
hashCode
in interfaceSet<BlockVector3>
- Overrides:
hashCode
in classAbstractSet<BlockVector3>
-
equals
- Specified by:
equals
in interfaceCollection<BlockVector3>
- Specified by:
equals
in interfaceSet<BlockVector3>
- Overrides:
equals
in classAbstractSet<BlockVector3>
-