Class BlockSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<BlockVector3>
com.sk89q.worldedit.regions.AbstractRegion
com.fastasyncworldedit.core.util.collection.BlockSet
- All Implemented Interfaces:
IBatchProcessor
,Region
,Cloneable
,Iterable<BlockVector3>
,Collection<BlockVector3>
,Set<BlockVector3>
- Direct Known Subclasses:
MemBlockSet
-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.AbstractRegion
world
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
add
(int x, int y, int z) boolean
add
(BlockVector3 p) abstract void
clear
(int x, int y, int z) abstract boolean
contains
(int x, int y, int z) boolean
contains
(BlockVector3 obj) Returns true based on whether the region contains the point.boolean
void
contract
(BlockVector3... changes) Contract the region.void
expand
(BlockVector3... changes) Expand the region.final int
int
abstract Set<BlockVector3>
Return a list of 16*16*16 chunks in a region.int
int
abstract Set<BlockVector2>
Get a list of chunks.protected final int
highestBit
(long bitBuffer) boolean
isGlobal()
abstract Iterator<BlockVector3>
iterator()
Get the iterator.protected final int
lowestBit
(long bitBuffer) abstract boolean
remove
(int x, int y, int z) boolean
boolean
abstract void
set
(int x, int y, int z) 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
addAll, clear, containsAll, isEmpty, 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, postProcessSet, processGet, remove, trimNBT, trimY
Methods inherited from interface com.sk89q.worldedit.regions.Region
construct, contains, containsChunk, containsEntireCuboid, filter, filter, filter, filter, filter, getArea, getDimensions, getMaximumPoint, getMaximumY, getMinimumPoint, getMinimumY, getScope, processSet, processSet
Methods inherited from interface java.util.Set
addAll, clear, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
-
Constructor Details
-
BlockSet
public BlockSet(int offsetX, int offsetZ)
-
-
Method Details
-
contains
- Specified by:
contains
in interfaceCollection<BlockVector3>
- Specified by:
contains
in interfaceSet<BlockVector3>
- Overrides:
contains
in classAbstractCollection<BlockVector3>
-
contains
Description copied from interface:Region
Returns true based on whether the region contains the point.- Parameters:
obj
- the position- Returns:
- true if contained
-
lowestBit
protected final int lowestBit(long bitBuffer) -
highestBit
protected final int highestBit(long bitBuffer) -
isGlobal
public boolean isGlobal() -
getBlockOffsetX
public final int getBlockOffsetX() -
getBlockOffsetZ
public int getBlockOffsetZ() -
getChunkOffsetX
public int getChunkOffsetX() -
getChunkOffsetZ
public int getChunkOffsetZ() -
add
- Specified by:
add
in interfaceCollection<BlockVector3>
- Specified by:
add
in interfaceSet<BlockVector3>
- Overrides:
add
in classAbstractCollection<BlockVector3>
-
remove
-
remove
- Specified by:
remove
in interfaceCollection<BlockVector3>
- Specified by:
remove
in interfaceSet<BlockVector3>
- Overrides:
remove
in classAbstractCollection<BlockVector3>
-
contains
public abstract boolean contains(int x, int y, int z) -
add
public abstract boolean add(int x, int y, int z) -
set
public abstract void set(int x, int y, int z) -
clear
public abstract void clear(int x, int y, int z) -
remove
public abstract boolean remove(int x, int y, int z) -
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
-
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
-
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
-