public class CuboidRegion extends AbstractRegion implements FlatRegion
world| Constructor and Description |
|---|
CuboidRegion(LocalWorld world,
Vector pos1,
Vector pos2)
Construct a new instance of this cuboid region.
|
CuboidRegion(Vector pos1,
Vector pos2)
Construct a new instance of this cuboid region.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Vector2D> |
asFlatRegion() |
CuboidRegion |
clone() |
boolean |
contains(Vector pt)
Returns true based on whether the region contains the point,
|
void |
contract(Vector... changes)
Contracts the cuboid in a direction.
|
void |
expand(Vector... changes)
Expands the cuboid in a direction.
|
Set<Vector> |
getChunkCubes()
Return a list of 16*16*16 chunks in a region
|
Set<Vector2D> |
getChunks()
Get a list of chunks that this region is within.
|
Vector |
getMaximumPoint()
Get the upper point of the cuboid.
|
int |
getMaximumY()
Gets the maximum Y value
|
Vector |
getMinimumPoint()
Get the lower point of the cuboid.
|
int |
getMinimumY()
Gets the minimum Y value
|
Vector |
getPos1()
Get position 1.
|
Vector |
getPos2()
Get position 2.
|
Iterator<BlockVector> |
iterator()
Get the iterator.
|
static CuboidRegion |
makeCuboid(Region region)
Make a cuboid region out of the given region using the minimum and maximum
bounds of the provided region.
|
void |
setPos1(Vector pos1)
Set position 1.
|
void |
setPos2(Vector pos2)
Set position 2.
|
void |
shift(Vector change)
Shift the region.
|
String |
toString()
Returns string representation in the format
"(minX, minY, minZ) - (maxX, maxY, maxZ)".
|
getArea, getCenter, getHeight, getLength, getWidth, getWorld, polygonize, setWorldpublic CuboidRegion(Vector pos1, Vector pos2)
pos1 - pos2 - public CuboidRegion(LocalWorld world, Vector pos1, Vector pos2)
world - pos1 - pos2 - public Vector getMinimumPoint()
getMinimumPoint in interface Regionpublic Vector getMaximumPoint()
getMaximumPoint in interface Regionpublic int getMinimumY()
FlatRegiongetMinimumY in interface FlatRegionpublic int getMaximumY()
FlatRegiongetMaximumY in interface FlatRegionpublic void expand(Vector... changes)
public void contract(Vector... changes)
public void shift(Vector change) throws RegionOperationException
Regionshift in interface Regionshift in class AbstractRegionRegionOperationExceptionpublic Vector getPos1()
public void setPos1(Vector pos1)
pos1 - public Vector getPos2()
public void setPos2(Vector pos2)
pos2 - public Set<Vector2D> getChunks()
getChunks in interface RegiongetChunks in class AbstractRegionpublic Set<Vector> getChunkCubes()
RegiongetChunkCubes in interface RegiongetChunkCubes in class AbstractRegionpublic boolean contains(Vector pt)
public Iterator<BlockVector> iterator()
iterator in interface Iterable<BlockVector>iterator in class AbstractRegionpublic Iterable<Vector2D> asFlatRegion()
asFlatRegion in interface FlatRegionpublic String toString()
public CuboidRegion clone()
clone in interface Regionclone in class AbstractRegionpublic static CuboidRegion makeCuboid(Region region)
region - the regionCopyright © 2010-2014. All Rights Reserved.