Class OncePerChunkExtent
- All Implemented Interfaces:
IBatchProcessor,Extent,InputExtent,OutputExtent
- Since:
- 2.13.0
-
Field Summary
Fields inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
extent -
Constructor Summary
ConstructorsConstructorDescriptionOncePerChunkExtent(Extent extent, IQueueExtent<IQueueChunk> queue, Consumer<IChunkGet> task) Create a new instance. -
Method Summary
Modifier and TypeMethodDescription@Nullable ExtentConvert this processor into an Extent based processor instead of a queue batch based on.getBiome(BlockVector3 position) Get the biome at the given location.getBiomeType(int x, int y, int z) getBlock(int x, int y, int z) getBlock(BlockVector3 position) Get a snapshot of the block at the given location.intgetBrightness(int x, int y, int z) intgetEmittedLight(int x, int y, int z) getFullBlock(int x, int y, int z) getFullBlock(BlockVector3 position) Get an immutable snapshot of the block at the given location.getScope()Default to CUSTOM ProcessorScope as we want custom processors people add to be before we write history, but after FAWE does it's own stuff.intgetSkyLight(int x, int y, int z) getTask()Get the task run once per chunk.processGet(IChunkGet get) Process a chunk GET.processSet(IChunk chunk, IChunkGet get, IChunkSet set) Process a chunk that has been set.voidreset()Reset the chunks visitedbooleanbooleansetBiome(BlockVector3 position, BiomeType biome) Set the biome.voidsetBlockLight(int x, int y, int z, int value) voidsetSkyLight(int x, int y, int z, int value) voidSet the task to be run once per chunkMethods inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
addPostProcessor, addProcessor, apply, cancel, commit, commitBefore, countBlocks, countBlocks, createEntity, createEntity, disableHistory, disableQueue, enableQueue, fullySupports3DBiomes, getBlockDistribution, getBlockDistributionWithData, getEntities, getEntities, getExtent, getMaximumPoint, getMaxY, getMinimumPoint, getMinY, isQueueEnabled, isWorld, relight, relightBlock, relightSky, removeEntity, replaceBlocks, replaceBlocks, replaceBlocks, setBlock, setBlock, setBlocks, setBlocks, setBlocks, setChangeSet, tile, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sk89q.worldedit.extent.Extent
addCaves, addOre, addOres, addSchems, apply, center, contains, contains, enableHistory, generate, getHighestTerrainBlock, getHighestTerrainBlock, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, lazyCopy, regenerateChunk, spawnResourceMethods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, remove, trimNBT, trimNBT, trimYMethods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBrightness, getEmittedLight, getHeightMap, getOpacity, getOpacity, getSkyLightMethods inherited from interface com.sk89q.worldedit.extent.OutputExtent
setBiome, setBlockLight, setHeightMap, setSkyLight, setTile
-
Constructor Details
-
OncePerChunkExtent
public OncePerChunkExtent(@Nonnull Extent extent, @Nonnull IQueueExtent<IQueueChunk> queue, @Nonnull Consumer<IChunkGet> task) Create a new instance.- Parameters:
extent- the extentqueue- Queue to load chunk GET from if acting as extent not processortask- Consumer task for the chunk GET- Since:
- 2.13.0
-
-
Method Details
-
getTask
Get the task run once per chunk. -
setTask
Set the task to be run once per chunk -
processSet
Description copied from interface:IBatchProcessorProcess a chunk that has been set.- Specified by:
processSetin interfaceIBatchProcessor
-
processGet
Description copied from interface:IBatchProcessorProcess a chunk GET. Method typically only called when a chunk is loaded into memory (miss fromcache).- Specified by:
processGetin interfaceIBatchProcessor- Parameters:
get- GET chunk loaded- Returns:
- processed get chunk
-
construct
Description copied from interface:IBatchProcessorConvert this processor into an Extent based processor instead of a queue batch based on.- Specified by:
constructin interfaceIBatchProcessor
-
getScope
Description copied from interface:IBatchProcessorDefault to CUSTOM ProcessorScope as we want custom processors people add to be before we write history, but after FAWE does it's own stuff.- Specified by:
getScopein interfaceIBatchProcessor
-
getBlock
Description copied from interface:InputExtentGet a snapshot of the block at the given location.If the given position is out of the bounds of the extent, then the behavior is undefined (an air block could be returned). However,
nullshould not be returned.The returned block is immutable and is a snapshot of the block at the time of call. It has no position attached to it, so it could be reused in
Patterns and so on.- Specified by:
getBlockin interfaceInputExtent- Overrides:
getBlockin classAbstractDelegateExtent- Parameters:
position- position of the block- Returns:
- the block
-
getBlock
- Specified by:
getBlockin interfaceInputExtent- Overrides:
getBlockin classAbstractDelegateExtent
-
getFullBlock
Description copied from interface:InputExtentGet an immutable snapshot of the block at the given location.- Specified by:
getFullBlockin interfaceInputExtent- Overrides:
getFullBlockin classAbstractDelegateExtent- Parameters:
position- position of the block- Returns:
- the block
-
getFullBlock
- Specified by:
getFullBlockin interfaceInputExtent- Overrides:
getFullBlockin classAbstractDelegateExtent
-
getBiomeType
- Specified by:
getBiomeTypein interfaceInputExtent- Overrides:
getBiomeTypein classAbstractDelegateExtent
-
getBiome
Description copied from interface:InputExtentGet the biome at the given location.If there is no biome available, then the ocean biome should be returned.
As implementation varies per Minecraft version, this may not exactly get this positions biome. On versions prior to 1.15, this will get the entire column. On later versions it will get the 4x4x4 cube's biome.
- Specified by:
getBiomein interfaceInputExtent- Overrides:
getBiomein classAbstractDelegateExtent- Parameters:
position- the (x, y, z) location to check the biome at- Returns:
- the biome at the location
- See Also:
-
getEmittedLight
public int getEmittedLight(int x, int y, int z) - Specified by:
getEmittedLightin interfaceInputExtent- Overrides:
getEmittedLightin classAbstractDelegateExtent
-
getSkyLight
public int getSkyLight(int x, int y, int z) - Specified by:
getSkyLightin interfaceInputExtent- Overrides:
getSkyLightin classAbstractDelegateExtent
-
getBrightness
public int getBrightness(int x, int y, int z) - Specified by:
getBrightnessin interfaceInputExtent- Overrides:
getBrightnessin classAbstractDelegateExtent
-
setBiome
- Specified by:
setBiomein interfaceOutputExtent- Overrides:
setBiomein classAbstractDelegateExtent
-
setBiome
Description copied from interface:OutputExtentSet the biome.As implementation varies per Minecraft version, this may set more than this position's biome. On versions prior to 1.15, this will set the entire column. On later versions it will set the 4x4x4 cube.
- Specified by:
setBiomein interfaceOutputExtent- Overrides:
setBiomein classAbstractDelegateExtent- Parameters:
position- the (x, y, z) location to set the biome atbiome- the biome to set to- Returns:
- true if the biome was successfully set (return value may not be accurate)
-
setBlockLight
public void setBlockLight(int x, int y, int z, int value) - Specified by:
setBlockLightin interfaceOutputExtent- Overrides:
setBlockLightin classAbstractDelegateExtent
-
setSkyLight
public void setSkyLight(int x, int y, int z, int value) - Specified by:
setSkyLightin interfaceOutputExtent- Overrides:
setSkyLightin classAbstractDelegateExtent
-
reset
public void reset()Reset the chunks visited
-