Class NullChunkGet
java.lang.Object
com.fastasyncworldedit.core.queue.implementation.blocks.NullChunkGet
- All Implemented Interfaces:
IBlocks
,IChunkGet
,ITileInput
,Trimable
,InputExtent
-
Method Summary
Modifier and TypeMethodDescription<T extends Future<T>>
TgetBiomeType
(int x, int y, int z) getBlock
(int x, int y, int z) int
getEmittedLight
(int x, int y, int z) getFullBlock
(int x, int y, int z) int[]
getHeightMap
(HeightMapType type) static NullChunkGet
int
Get the highest layer position stored in the internal chunk.int
getMaxY()
Max y value for the chunk's world (inclusive)int
Get the lowest layer position stored in the internal chunk.int
getMinY()
Min y value for the chunk's world (inclusive)int
Get the number of stored sectionsint
getSkyLight
(int x, int y, int z) getTile
(int x, int y, int z) getTiles()
boolean
hasSection
(int layer) Returns if the chunk has a BLOCKS section at the given layer.boolean
char[]
load
(int layer) Obtain the specified chunk section stored as an array of ordinals.char[]
loadIfPresent
(int layer) Obtain the specified chunk section stored as an array of ordinals if present or null.void
removeSectionLighting
(int layer, boolean sky) reset()
void
setCreateCopy
(boolean createCopy) void
setHeightmapToGet
(HeightMapType type, int[] data) void
setLightingToGet
(char[][] lighting, int startSectionIndex, int endSectionIndex) Flush the block lighting array (section*blocks) to the chunk GET between the given section indices.void
setSkyLightingToGet
(char[][] lighting, int minSectionPosition, int maxSectionPosition) Flush the sky lighting array (section*blocks) to the chunk GET between the given section indices.boolean
trim
(boolean aggressive) Trims the object, reducing its memory footprint.boolean
trim
(boolean aggressive, int layer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.queue.IBlocks
getBitMask, toByteArray, toByteArray
Methods inherited from interface com.fastasyncworldedit.core.queue.IChunkGet
getBiome, getCopy, optimize
Methods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBlock, getBrightness, getBrightness, getEmittedLight, getFullBlock, getOpacity, getOpacity, getSkyLight
-
Method Details
-
getInstance
-
getFullBlock
- Specified by:
getFullBlock
in interfaceIChunkGet
- Specified by:
getFullBlock
in interfaceInputExtent
-
getBiomeType
- Specified by:
getBiomeType
in interfaceIBlocks
- Specified by:
getBiomeType
in interfaceIChunkGet
- Specified by:
getBiomeType
in interfaceInputExtent
-
removeSectionLighting
public void removeSectionLighting(int layer, boolean sky) - Specified by:
removeSectionLighting
in interfaceIBlocks
-
getBlock
-
getTiles
-
getTile
- Specified by:
getTile
in interfaceIBlocks
- Specified by:
getTile
in interfaceITileInput
-
getEntities
- Specified by:
getEntities
in interfaceIBlocks
-
getEntity
-
setCreateCopy
public void setCreateCopy(boolean createCopy) - Specified by:
setCreateCopy
in interfaceIChunkGet
-
isCreateCopy
public boolean isCreateCopy()- Specified by:
isCreateCopy
in interfaceIChunkGet
-
setLightingToGet
public void setLightingToGet(char[][] lighting, int startSectionIndex, int endSectionIndex) Description copied from interface:IChunkGet
Flush the block lighting array (section*blocks) to the chunk GET between the given section indices. Negative allowed.- Specified by:
setLightingToGet
in interfaceIChunkGet
- Parameters:
lighting
- lighting arraystartSectionIndex
- lowest section indexendSectionIndex
- highest section index
-
setSkyLightingToGet
public void setSkyLightingToGet(char[][] lighting, int minSectionPosition, int maxSectionPosition) Description copied from interface:IChunkGet
Flush the sky lighting array (section*blocks) to the chunk GET between the given section indices. Negative allowed.- Specified by:
setSkyLightingToGet
in interfaceIChunkGet
- Parameters:
lighting
- sky lighting arrayminSectionPosition
- lowest section indexmaxSectionPosition
- highest section index
-
setHeightmapToGet
- Specified by:
setHeightmapToGet
in interfaceIChunkGet
-
getMaxY
public int getMaxY()Description copied from interface:IChunkGet
Max y value for the chunk's world (inclusive) -
getMinY
public int getMinY()Description copied from interface:IChunkGet
Min y value for the chunk's world (inclusive) -
getMaxSectionPosition
public int getMaxSectionPosition()Description copied from interface:IBlocks
Get the highest layer position stored in the internal chunk. For 1.16 and below, always returns 15. For 1.17 and above, may not return a value correct to the world if this is aIChunkSet
instance, which defaults to 15. For extended height worlds, this will only return over 15 if blocks are stored outside the default range.- Specified by:
getMaxSectionPosition
in interfaceIBlocks
-
getMinSectionPosition
public int getMinSectionPosition()Description copied from interface:IBlocks
Get the lowest layer position stored in the internal chunk. For 1.16 and below, always returns 0. For 1.17 and above, may not return a value correct to the world if this is aIChunkSet
instance, which defaults to 0. For extended height worlds, this will only return under 0 if blocks are stored outside the default range.- Specified by:
getMinSectionPosition
in interfaceIBlocks
-
trim
public boolean trim(boolean aggressive) Description copied from interface:Trimable
Trims the object, reducing its memory footprint. -
trim
public boolean trim(boolean aggressive, int layer) -
call
-
load
@Nonnull public char[] load(int layer) Description copied from interface:IBlocks
Obtain the specified chunk section stored as an array of ordinals. Uses normal minecraft chunk-section position indices (length 4096). Operations synchronises on the section and will load the section into memory if not present. For chunk GET operations, this will load the data from the world. For chunk SET, this will create a new empty array. -
loadIfPresent
@Nullable public char[] loadIfPresent(int layer) Description copied from interface:IBlocks
Obtain the specified chunk section stored as an array of ordinals if present or null. Uses normal minecraft chunk-section position indices (length 4096). Does not synchronise to the section layer as it will not attempt to load into memory.- Specified by:
loadIfPresent
in interfaceIBlocks
- Parameters:
layer
- chunk section layer (may be negative)- Returns:
- char array of ordinals of the chunk section if present
-
hasSection
public boolean hasSection(int layer) Description copied from interface:IBlocks
Returns if the chunk has a BLOCKS section at the given layer. May not be indicative of presence of entities, tile entites, biomes, etc.- Specified by:
hasSection
in interfaceIBlocks
- Parameters:
layer
- chunk section layer- Returns:
- if blocks/a block section is present
-
getEmittedLight
public int getEmittedLight(int x, int y, int z) - Specified by:
getEmittedLight
in interfaceIChunkGet
- Specified by:
getEmittedLight
in interfaceInputExtent
-
getSkyLight
public int getSkyLight(int x, int y, int z) - Specified by:
getSkyLight
in interfaceIChunkGet
- Specified by:
getSkyLight
in interfaceInputExtent
-
getHeightMap
- Specified by:
getHeightMap
in interfaceIChunkGet
- Specified by:
getHeightMap
in interfaceInputExtent
-
reset
-
getSectionCount
public int getSectionCount()Description copied from interface:IBlocks
Get the number of stored sections- Specified by:
getSectionCount
in interfaceIBlocks
-