Class ParallelQueueExtent
java.lang.Object
com.sk89q.worldedit.extent.AbstractDelegateExtent
com.fastasyncworldedit.core.extent.PassthroughExtent
com.fastasyncworldedit.core.queue.implementation.ParallelQueueExtent
- All Implemented Interfaces:
Extent
,InputExtent
,OutputExtent
-
Field Summary
Fields inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
extent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Filter>
Tboolean
cancel()
int
countBlocks
(Region region, Mask searchMask) Count the number of blocks of a list of types in a region.int
countBlocks
(Region region, Set<BaseBlock> searchBlocks) Count the number of blocks of a list of types in a region.getBlockDistribution
(Region region) Get the block distribution inside a region.getBlockDistributionWithData
(Region region) Get the block distribution (with data values) inside a region.Get the extent.Lazily copy a regionint
replaceBlocks
(Region region, Mask mask, Pattern pattern) Replaces all the blocks matching a given mask, within a given region, to a block returned by a given pattern.<B extends BlockStateHolder<B>>
intreplaceBlocks
(Region region, Set<BaseBlock> filter, B replacement) Replaces all the blocks matching a given filter, within a given region, to a block returned by a given pattern.int
replaceBlocks
(Region region, Set<BaseBlock> filter, Pattern pattern) Replaces all the blocks matching a given filter, within a given region, to a block returned by a given pattern.<B extends BlockStateHolder<B>>
intSets all the blocks inside a region to a given block type.int
Sets all the blocks inside a region to a given pattern.int
setBlocks
(Set<BlockVector3> vset, Pattern pattern) Methods inherited from class com.fastasyncworldedit.core.extent.PassthroughExtent
addCaves, addOre, addOres, addSchems, apply, center, commit, contains, disableQueue, enableQueue, generate, getBlock, getFullBlock, getHighestTerrainBlock, getHighestTerrainBlock, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, isQueueEnabled, isWorld, regenerateChunk, setBiome, setBlock, setTile, spawnResource
Methods inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
addPostProcessor, addProcessor, commitBefore, createEntity, disableHistory, fullySupports3DBiomes, getBiome, getBiomeType, getBlock, getBrightness, getEmittedLight, getEntities, getEntities, getFullBlock, getMaximumPoint, getMaxY, getMinimumPoint, getMinY, getSkyLight, relight, relightBlock, relightSky, removeEntity, setBiome, setBlock, setBlockLight, setChangeSet, setSkyLight, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.extent.Extent
contains, enableHistory
Methods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBrightness, getEmittedLight, getHeightMap, getOpacity, getOpacity, getSkyLight
Methods inherited from interface com.sk89q.worldedit.extent.OutputExtent
setBiome, setBlockLight, setHeightMap, setSkyLight
-
Constructor Details
-
ParallelQueueExtent
-
-
Method Details
-
getExtent
Description copied from class:AbstractDelegateExtent
Get the extent.- Overrides:
getExtent
in classAbstractDelegateExtent
- Returns:
- the extent
-
cancel
public boolean cancel()- Specified by:
cancel
in interfaceExtent
- Overrides:
cancel
in classPassthroughExtent
-
apply
- Specified by:
apply
in interfaceExtent
- Overrides:
apply
in classPassthroughExtent
-
countBlocks
Description copied from interface:Extent
Count the number of blocks of a list of types in a region.- Specified by:
countBlocks
in interfaceExtent
- Overrides:
countBlocks
in classPassthroughExtent
- Parameters:
region
- the regionsearchMask
- mask to match- Returns:
- the number of blocks that matched the mask
-
setBlocks
public <B extends BlockStateHolder<B>> int setBlocks(Region region, B block) throws MaxChangedBlocksException Description copied from interface:Extent
Sets all the blocks inside a region to a given block type.- Specified by:
setBlocks
in interfaceExtent
- Overrides:
setBlocks
in classPassthroughExtent
- Parameters:
region
- the regionblock
- the block- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- thrown if too many blocks are changed
-
setBlocks
Description copied from interface:Extent
Sets all the blocks inside a region to a given pattern.- Specified by:
setBlocks
in interfaceExtent
- Overrides:
setBlocks
in classPassthroughExtent
- Parameters:
region
- the regionpattern
- the pattern that provides the replacement block- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- thrown if too many blocks are changed
-
setBlocks
- Specified by:
setBlocks
in interfaceExtent
- Overrides:
setBlocks
in classPassthroughExtent
-
replaceBlocks
public int replaceBlocks(Region region, Mask mask, Pattern pattern) throws MaxChangedBlocksException Description copied from interface:Extent
Replaces all the blocks matching a given mask, within a given region, to a block returned by a given pattern.- Specified by:
replaceBlocks
in interfaceExtent
- Overrides:
replaceBlocks
in classPassthroughExtent
- Parameters:
region
- the region to replace the blocks withinmask
- the mask that blocks must matchpattern
- the pattern that provides the new blocks- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- thrown if too many blocks are changed
-
getBlockDistributionWithData
Description copied from interface:Extent
Get the block distribution (with data values) inside a region.- Specified by:
getBlockDistributionWithData
in interfaceExtent
- Overrides:
getBlockDistributionWithData
in classPassthroughExtent
- Parameters:
region
- a region- Returns:
- the results
-
getBlockDistribution
Description copied from interface:Extent
Get the block distribution inside a region.- Specified by:
getBlockDistribution
in interfaceExtent
- Overrides:
getBlockDistribution
in classPassthroughExtent
- Parameters:
region
- a region- Returns:
- the results
-
lazyCopy
Lazily copy a region- Specified by:
lazyCopy
in interfaceExtent
- Overrides:
lazyCopy
in classPassthroughExtent
- Returns:
-
countBlocks
Count the number of blocks of a list of types in a region.- Specified by:
countBlocks
in interfaceExtent
- Overrides:
countBlocks
in classPassthroughExtent
- Parameters:
region
- the regionsearchBlocks
- the list of blocks to search- Returns:
- the number of blocks that matched the block
-
replaceBlocks
public <B extends BlockStateHolder<B>> int replaceBlocks(Region region, Set<BaseBlock> filter, B replacement) throws MaxChangedBlocksException Replaces all the blocks matching a given filter, within a given region, to a block returned by a given pattern.- Specified by:
replaceBlocks
in interfaceExtent
- Overrides:
replaceBlocks
in classPassthroughExtent
- Parameters:
region
- the region to replace the blocks withinfilter
- a list of block types to match, or null to useExistingBlockMask
replacement
- the replacement block- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- thrown if too many blocks are changed
-
replaceBlocks
public int replaceBlocks(Region region, Set<BaseBlock> filter, Pattern pattern) throws MaxChangedBlocksException Replaces all the blocks matching a given filter, within a given region, to a block returned by a given pattern.- Specified by:
replaceBlocks
in interfaceExtent
- Overrides:
replaceBlocks
in classPassthroughExtent
- Parameters:
region
- the region to replace the blocks withinfilter
- a list of block types to match, or null to useExistingBlockMask
pattern
- the pattern that provides the new blocks- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- thrown if too many blocks are changed
-