public class RegionIntersection extends AbstractRegion
iterator()
returns a special iterator that will iterate through
the iterators of each region in an undefined sequence. Some positions may
be repeated if the position is contained in more than one region, but this cannot
be guaranteed to occur.
world
Constructor and Description |
---|
RegionIntersection(java.util.List<Region> regions)
Create a new instance with the included list of regions.
|
RegionIntersection(Region... regions)
Create a new instance with the included list of regions.
|
RegionIntersection(World world,
java.util.List<Region> regions)
Create a new instance with the included list of regions.
|
RegionIntersection(World world,
Region... regions)
Create a new instance with the included list of regions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(BlockVector3 position)
Returns true based on whether the region contains the point.
|
void |
contract(BlockVector3... changes)
Contract the region.
|
void |
expand(BlockVector3... changes)
Expand the region.
|
BlockVector3 |
getMaximumPoint()
Get the upper point of a region.
|
BlockVector3 |
getMinimumPoint()
Get the lower point of a region.
|
java.util.Iterator<BlockVector3> |
iterator()
Get the iterator.
|
clone, getCenter, getChunkCubes, getChunks, getHeight, getLength, getVolume, getWidth, getWorld, getWorldMaxY, getWorldMinY, polygonize, setWorld, shift
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArea, getBoundingBox
public RegionIntersection(java.util.List<Region> regions)
regions
- a list of regions, which is copiedpublic RegionIntersection(Region... regions)
regions
- a list of regions, which is copiedpublic RegionIntersection(World world, java.util.List<Region> regions)
world
- the worldregions
- a list of regions, which is copiedpublic BlockVector3 getMinimumPoint()
Region
public BlockVector3 getMaximumPoint()
Region
public void expand(BlockVector3... changes) throws RegionOperationException
Region
changes
- array/arguments with multiple related changesRegionOperationException
- if the operation cannot be performedpublic void contract(BlockVector3... changes) throws RegionOperationException
Region
changes
- array/arguments with multiple related changesRegionOperationException
- if the operation cannot be performedpublic boolean contains(BlockVector3 position)
Region
position
- the positionpublic java.util.Iterator<BlockVector3> iterator()
AbstractRegion
iterator
in interface java.lang.Iterable<BlockVector3>
iterator
in class AbstractRegion