Class 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 TypeMethodDescriptioncreateEntity
(Location location, BaseEntity entity) Create an entity at the given location.getBiome
(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) Get a list of all entities.getEntities
(Region region) Get a list of all entities within the given region.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.void
removeEntity
(Entity entity) Remove entity from clipboard.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 minMethods inherited from class com.fastasyncworldedit.core.extent.clipboard.LinearClipboard
finalize, iterator, iterator, 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
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(BlockVector2)
strongly suggests returningBiomeTypes.OCEAN
instead ofnull
if biomes aren't present. However, it might not be desired to set areas to ocean if the clipboard is defaulting to ocean, instead of having biomes explicitly set.- 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
-
setBlock
-
setBlock
- Specified by:
setBlock
in classLinearClipboard
-
createEntity
Description copied from interface:Extent
Create an entity at the given location.- Parameters:
location
- the locationentity
- the entity- Returns:
- a reference to the created entity, or null if the entity could not be created
-
getEntities
Description copied from interface:Extent
Get a list of all entities.If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.
- Returns:
- a list of entities
-
getEntities
Description copied from interface:Extent
Get a list of all entities within the given region.If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.
- Parameters:
region
- the region in which entities must be contained- Returns:
- a list of entities
-
removeEntity
Description copied from interface:Clipboard
Remove entity from clipboard.
-