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
ConstructorsConstructorDescriptionRegionIntersection(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 TypeMethodDescriptionbooleancontains(int x, int z) booleancontains(int x, int y, int z) booleancontains(BlockVector3 position) Returns true based on whether the region contains the point.booleancontainsChunk(int chunkX, int chunkZ) Returns whether this region intersects with the AABB of the given chunk.booleancontainsEntireCuboid(int bx, int tx, int by, int ty, int bz, int tz) voidcontract(BlockVector3... changes) Contract the region.voidexpand(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, sizeMethods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, processGet, processGet, remove, trimNBT, trimNBT, trimYMethods 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:RegionGet the lower point of a region.- Returns:
- min. point
-
getMaximumPoint
Description copied from interface:RegionGet the upper point of a region.- Returns:
- max. point
-
expand
Description copied from interface:RegionExpand the region.- Parameters:
changes- array/arguments with multiple related changes- Throws:
RegionOperationException- if the operation cannot be performed
-
contract
Description copied from interface:RegionContract the region.- Parameters:
changes- array/arguments with multiple related changes- Throws:
RegionOperationException- if the operation cannot be performed
-
contains
Description copied from interface:RegionReturns true based on whether the region contains the point.- Parameters:
position- the position- Returns:
- true if contained
-
iterator
Description copied from class:AbstractRegionGet the iterator.- Specified by:
iteratorin interfaceCollection<BlockVector3>- Specified by:
iteratorin interfaceIterable<BlockVector3>- Specified by:
iteratorin interfaceSet<BlockVector3>- Overrides:
iteratorin 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:IBatchProcessorProcess a chunk that has been set. -
postProcessSet
Description copied from interface:IBatchProcessorPost-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:RegionProcess 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:AbstractRegionGet a list of chunks.- Specified by:
getChunksin interfaceRegion- Overrides:
getChunksin classAbstractRegion- Returns:
- a set of chunks
-
getChunkCubes
Description copied from interface:RegionReturn a list of 16*16*16 chunks in a region.- Specified by:
getChunkCubesin interfaceRegion- Overrides:
getChunkCubesin classAbstractRegion- Returns:
- the chunk cubes this region overlaps with
-
containsChunk
public boolean containsChunk(int chunkX, int chunkZ) Description copied from interface:RegionReturns whether this region intersects with the AABB of the given chunk.- Returns:
- whether this region intersects with the AABB of the given chunk
-
contains
public boolean contains(int x, int z) -
contains
public boolean contains(int x, int y, int z)
-