public abstract class AbstractRegion extends java.lang.Object implements Region
Constructor and Description |
---|
AbstractRegion(World world) |
Modifier and Type | Method and Description |
---|---|
AbstractRegion |
clone()
Make a clone of the region.
|
Vector3 |
getCenter()
Get the center point of a region.
|
java.util.Set<BlockVector3> |
getChunkCubes()
Return a list of 16*16*16 chunks in a region.
|
java.util.Set<BlockVector2> |
getChunks()
Get a list of chunks.
|
int |
getHeight()
Get Y-size.
|
int |
getLength()
Get Z-size.
|
long |
getVolume()
Get the number of blocks in the region.
|
int |
getWidth()
Get X-size.
|
World |
getWorld()
Sets the world that the selection is in.
|
protected int |
getWorldMaxY() |
protected int |
getWorldMinY() |
java.util.Iterator<BlockVector3> |
iterator()
Get the iterator.
|
java.util.List<BlockVector2> |
polygonize(int maxPoints)
Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.
|
void |
setWorld(World world)
Sets the world that the selection is in.
|
void |
shift(BlockVector3 change)
Shift the region.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, contract, expand, getArea, getBoundingBox, getMaximumPoint, getMinimumPoint
protected World world
public AbstractRegion(World world)
public Vector3 getCenter()
Region
public java.util.Iterator<BlockVector3> iterator()
iterator
in interface java.lang.Iterable<BlockVector3>
public World getWorld()
Region
public void setWorld(World world)
Region
public void shift(BlockVector3 change) throws RegionOperationException
Region
shift
in interface Region
change
- the changeRegionOperationException
- if the operation cannot be performedpublic AbstractRegion clone()
Region
public java.util.List<BlockVector2> polygonize(int maxPoints)
Region
polygonize
in interface Region
maxPoints
- maximum number of points to generate. -1 for no limit.public long getVolume()
Region
public int getWidth()
public int getHeight()
public int getLength()
public java.util.Set<BlockVector2> getChunks()
public java.util.Set<BlockVector3> getChunkCubes()
Region
getChunkCubes
in interface Region
protected final int getWorldMinY()
protected final int getWorldMaxY()