Package com.sk89q.worldedit.regions
Class RegionIntersection
java.lang.Object
java.util.AbstractCollection<BlockVector3>
java.util.AbstractSet<BlockVector3>
com.sk89q.worldedit.regions.AbstractRegion
com.sk89q.worldedit.regions.RegionIntersection
- All Implemented Interfaces:
IBatchProcessor
,Region
,Cloneable
,Iterable<BlockVector3>
,Collection<BlockVector3>
,Set<BlockVector3>
An intersection of several other regions. Any location that is contained in one
of the child regions is considered as contained by this region.
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.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.AbstractRegion
world
-
Constructor Summary
ConstructorDescriptionRegionIntersection
(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.RegionIntersection
(World world, Collection<Region> regions) Create a new instance with the included list of regions.RegionIntersection
(List<Region> regions) Create a new instance with the included list of regions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int x, int z) boolean
contains
(int x, int y, int z) boolean
contains
(BlockVector3 position) Returns true based on whether the region contains the point.boolean
containsChunk
(int chunkX, int chunkZ) boolean
containsEntireCuboid
(int bx, int tx, int by, int ty, int bz, int tz) void
contract
(BlockVector3... changes) Contract the region.void
expand
(BlockVector3... changes) Expand the region.Return a list of 16*16*16 chunks in a region.Get a list of chunks.Get the upper point of a region.Get the lower point of a region.iterator()
Get the iterator.Future
<?> postProcessSet
(IChunk chunk, IChunkGet get, IChunkSet set) Post-process a chunk that has been edited.processSet
(IChunk chunk, IChunkGet get, IChunkSet set) Process a chunk that has been set.processSet
(IChunk chunk, IChunkGet get, IChunkSet set, boolean asBlacklist) Process the chunk, with the option to process as if the region is a blacklisted region, and thus any contained blocks should be removed, rather than uncontained blocks being removed.Methods inherited from class com.sk89q.worldedit.regions.AbstractRegion
clone, equals, getCenter, getHeight, getLength, getVolume, getWidth, getWorld, getWorldMaxY, getWorldMinY, hashCode, polygonize, setWorld, shift, 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, processGet, remove, trimNBT, trimNBT, trimY
Methods inherited from interface com.sk89q.worldedit.regions.Region
construct, filter, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumY, getMinimumY, getScope, isGlobal
-
Constructor Details
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
regions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
regions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
world
- the worldregions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
world
- the worldregions
- an array of regions, which is copied
-
-
Method Details
-
getMinimumPoint
Description copied from interface:Region
Get the lower point of a region.- Returns:
- min. point
-
getMaximumPoint
Description copied from interface:Region
Get the upper point of a region.- Returns:
- max. point
-
expand
Description copied from interface:Region
Expand the region.- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
contract
Description copied from interface:Region
Contract the region.- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
contains
Description copied from interface:Region
Returns true based on whether the region contains the point.- Parameters:
position
- the position- Returns:
- true if contained
-
iterator
Description copied from class:AbstractRegion
Get the iterator.- Specified by:
iterator
in interfaceCollection<BlockVector3>
- Specified by:
iterator
in interfaceIterable<BlockVector3>
- Specified by:
iterator
in interfaceSet<BlockVector3>
- Overrides:
iterator
in classAbstractRegion
- Returns:
- iterator of points inside the region
-
containsEntireCuboid
public boolean containsEntireCuboid(int bx, int tx, int by, int ty, int bz, int tz) -
processSet
Description copied from interface:IBatchProcessor
Process a chunk that has been set. -
postProcessSet
Description copied from interface:IBatchProcessor
Post-process a chunk that has been edited. Set should NOT be modified here, changes will NOT be flushed to the world, but MAY be flushed to history. Defaults to nothing as most Processors will not use it. Post-processors that are not technically blocking should override this method to allow post-processors to become blocking if required. -
processSet
Description copied from interface:Region
Process the chunk, with the option to process as if the region is a blacklisted region, and thus any contained blocks should be removed, rather than uncontained blocks being removed.- Parameters:
asBlacklist
- If any blocks contained by the region should be removed
-
getRegions
-
getChunks
Description copied from class:AbstractRegion
Get a list of chunks.- Specified by:
getChunks
in interfaceRegion
- Overrides:
getChunks
in classAbstractRegion
- Returns:
- a set of chunks
-
getChunkCubes
Description copied from interface:Region
Return a list of 16*16*16 chunks in a region.- Specified by:
getChunkCubes
in interfaceRegion
- Overrides:
getChunkCubes
in classAbstractRegion
- Returns:
- the chunk cubes this region overlaps with
-
containsChunk
public boolean containsChunk(int chunkX, int chunkZ) -
contains
public boolean contains(int x, int z) -
contains
public boolean contains(int x, int y, int z)
-