public class CuboidRegion extends AbstractRegion implements FlatRegion
world| Constructor and Description |
|---|
CuboidRegion(LocalWorld world,
Vector pos1,
Vector pos2)
Deprecated.
cast
world to World |
CuboidRegion(Vector pos1,
Vector pos2)
Construct a new instance of this cuboid using two corners of the cuboid.
|
CuboidRegion(World world,
Vector pos1,
Vector pos2)
Construct a new instance of this cuboid using two corners of the cuboid.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Vector2D> |
asFlatRegion()
Get this region as an iterable flat region.
|
CuboidRegion |
clone()
Make a clone of the region.
|
boolean |
contains(Vector position)
Returns true based on whether the region contains the point.
|
void |
contract(Vector... changes)
Contract the region.
|
void |
expand(Vector... changes)
Expand the region.
|
static CuboidRegion |
fromCenter(Vector origin,
int apothem)
Make a cuboid from the center.
|
Set<Vector> |
getChunkCubes()
Return a list of 16*16*16 chunks in a region
|
Set<Vector2D> |
getChunks()
Get a list of chunks.
|
Region |
getFaces()
Get a region that contains the faces of this cuboid.
|
Vector |
getMaximumPoint()
Get the upper point of a region.
|
int |
getMaximumY()
Gets the maximum Y value
|
Vector |
getMinimumPoint()
Get the lower point of a region.
|
int |
getMinimumY()
Gets the minimum Y value
|
Vector |
getPos1()
Get the first cuboid-defining corner.
|
Vector |
getPos2()
Get the second cuboid-defining corner.
|
Region |
getWalls()
Get a region that contains the walls (all faces but the ones parallel to
the X-Z plane) of this cuboid.
|
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 the first cuboid-defining corner.
|
void |
setPos2(Vector pos2)
Set the second cuboid-defining corner.
|
void |
shift(Vector change)
Shift the region.
|
String |
toString() |
getArea, getCenter, getHeight, getLength, getWidth, getWorld, polygonize, setWorld, setWorldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArea, getCenter, getHeight, getLength, getWidth, getWorld, polygonize, setWorld, setWorldforEach, spliteratorpublic CuboidRegion(Vector pos1, Vector pos2)
pos1 - the first positionpos2 - the second position@Deprecated public CuboidRegion(LocalWorld world, Vector pos1, Vector pos2)
world to Worldpublic Vector getPos1()
public void setPos1(Vector pos1)
pos1 - a positionpublic Vector getPos2()
public void setPos2(Vector pos2)
pos2 - a positionpublic Region getFaces()
public Region getWalls()
public Vector getMinimumPoint()
RegiongetMinimumPoint in interface Regionpublic Vector getMaximumPoint()
RegiongetMaximumPoint in interface Regionpublic int getMinimumY()
FlatRegiongetMinimumY in interface FlatRegionpublic int getMaximumY()
FlatRegiongetMaximumY in interface FlatRegionpublic void expand(Vector... changes)
Regionpublic void contract(Vector... changes)
Regionpublic void shift(Vector change) throws RegionOperationException
Regionshift in interface Regionshift in class AbstractRegionchange - the changeRegionOperationExceptionpublic Set<Vector2D> getChunks()
AbstractRegiongetChunks in interface RegiongetChunks in class AbstractRegionpublic Set<Vector> getChunkCubes()
RegiongetChunkCubes in interface RegiongetChunkCubes in class AbstractRegionpublic boolean contains(Vector position)
Regionpublic Iterator<BlockVector> iterator()
AbstractRegioniterator in interface Iterable<BlockVector>iterator in class AbstractRegionpublic Iterable<Vector2D> asFlatRegion()
FlatRegionasFlatRegion in interface FlatRegionpublic CuboidRegion clone()
Regionclone in interface Regionclone in class AbstractRegionpublic static CuboidRegion makeCuboid(Region region)
region - the regionpublic static CuboidRegion fromCenter(Vector origin, int apothem)
origin - the originapothem - the apothem, where 0 is the minimum value to make a 1x1 cuboidCopyright © 2010-2014. All Rights Reserved.