Class MemoryOptimizedClipboard
java.lang.Object
com.fastasyncworldedit.core.extent.clipboard.SimpleClipboard
com.fastasyncworldedit.core.extent.clipboard.LinearClipboard
com.fastasyncworldedit.core.extent.clipboard.MemoryOptimizedClipboard
- All Implemented Interfaces:
Clipboard
,Extent
,InputExtent
,OutputExtent
,Closeable
,Flushable
,AutoCloseable
,Iterable<BlockVector3>
-
Field Summary
Fields inherited from class com.fastasyncworldedit.core.extent.clipboard.LinearClipboard
entities
Fields inherited from class com.fastasyncworldedit.core.extent.clipboard.SimpleClipboard
offset
-
Constructor Summary
ConstructorDescriptionMemoryOptimizedClipboard
(Region region) MemoryOptimizedClipboard
(Region region, int compressionLevel) -
Method Summary
Modifier and TypeMethodDescriptiongetBiome
(int index) getBiome
(BlockVector3 position) Get the biome at the given location.int
getBiomeIndex
(int x, int y, int z) getBiomeType
(int x, int y, int z) getBlock
(int index) getBlock
(int x, int y, int z) getFullBlock
(int index) getFullBlock
(int x, int y, int z) int
getIndex
(int x, int y, int z) boolean
Returns true if the clipboard has biome data.boolean
void
boolean
setBiome
(BlockVector3 position, BiomeType biome) Set the biome.<B extends BlockStateHolder<B>>
booleansetBlock
(int x, int y, int z, B block) <B extends BlockStateHolder<B>>
booleansetBlock
(int index, B block) boolean
setTile
(int x, int y, int z, CompoundTag tag) int
size()
void
streamBiomes
(IntValueReader task) The locations provided are relative to the clipboard minboolean
tile
(int x, int y, int z, FaweCompoundTag tile) Sets a tile/block entity at the given location.Methods inherited from class com.fastasyncworldedit.core.extent.clipboard.LinearClipboard
createEntity, createEntity, finalize, getEntities, getEntities, iterator, iterator, removeEntity, removeEntity
Methods inherited from class com.fastasyncworldedit.core.extent.clipboard.SimpleClipboard
getArea, getDimensions, getHeight, getLength, getMaximumPoint, getMinimumPoint, getOrigin, getRegion, getVolume, getWidth, setOffset, setOrigin
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.extent.clipboard.Clipboard
apply, close, flush, getURI, iterator2d, paste, paste, paste, paste, paste, paste, save, save, transform
Methods inherited from interface com.sk89q.worldedit.extent.Extent
addCaves, addOre, addOres, addPostProcessor, addProcessor, addSchems, apply, cancel, center, commit, contains, contains, countBlocks, countBlocks, disableHistory, disableQueue, enableHistory, enableQueue, generate, getBlockDistribution, getBlockDistributionWithData, getHighestTerrainBlock, getHighestTerrainBlock, getMaxY, getMinY, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, isQueueEnabled, isWorld, lazyCopy, regenerateChunk, relight, relightBlock, relightSky, replaceBlocks, replaceBlocks, replaceBlocks, setBlocks, setBlocks, setBlocks, spawnResource
Methods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBlock, getBrightness, getBrightness, getEmittedLight, getEmittedLight, getFullBlock, getHeightMap, getOpacity, getOpacity, getSkyLight, getSkyLight
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.sk89q.worldedit.extent.OutputExtent
fullySupports3DBiomes, setBiome, setBlock, setBlockLight, setBlockLight, setHeightMap, setSkyLight, setSkyLight
-
Constructor Details
-
MemoryOptimizedClipboard
-
MemoryOptimizedClipboard
-
-
Method Details
-
hasBiomes
public boolean hasBiomes()Description copied from interface:Clipboard
Returns true if the clipboard has biome data. This can be checked sinceInputExtent.getBiome(BlockVector3)
strongly suggests returningBiomeTypes.OCEAN
instead ofnull
if biomes aren't present.- Returns:
- true if the clipboard has biome data set
-
setBiome
Description copied from interface:OutputExtent
Set 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.
- 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)
-
setBiome
-
setBiome
- Specified by:
setBiome
in classLinearClipboard
-
streamBiomes
Description copied from class:LinearClipboard
The locations provided are relative to the clipboard min- Specified by:
streamBiomes
in classLinearClipboard
-
getBiome
- Specified by:
getBiome
in classLinearClipboard
-
getBiomeType
-
getBiome
Description copied from interface:InputExtent
Get 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.
- Parameters:
position
- the (x, y, z) location to check the biome at- Returns:
- the biome at the location
- See Also:
-
getTileEntities
- Specified by:
getTileEntities
in classLinearClipboard
-
getIndex
public int getIndex(int x, int y, int z) -
getBiomeIndex
public int getBiomeIndex(int x, int y, int z) -
getFullBlock
-
getFullBlock
- Specified by:
getFullBlock
in classLinearClipboard
-
getBlock
- Specified by:
getBlock
in classLinearClipboard
-
getBlock
-
size
public int size() -
setTile
-
tile
Description copied from interface:OutputExtent
Sets a tile/block entity at the given location.- Parameters:
x
- the x positiony
- the y positionz
- the z positiontile
- the tile/block entity to set- Returns:
true
if the tile/block entity was placed- Throws:
WorldEditException
-
setBlock
-
setBlock
- Specified by:
setBlock
in classLinearClipboard
-