SubChunk
Constants
COORD_BIT_SIZE
php
public const COORD_BIT_SIZE = 4COORD_MASK
php
public const COORD_MASK = ~(~0 << self::COORD_BIT_SIZE)EDGE_LENGTH
php
public const EDGE_LENGTH = 1 << self::COORD_BIT_SIZEMethods
__clone()
php
public function __clone()__construct()
php
public function __construct(int $emptyBlockId, array $blockLayers, \pocketmine\world\format\PalettedBlockArray $biomes, ?\pocketmine\world\format\LightArray $skyLight = null, ?\pocketmine\world\format\LightArray $blockLight = null)SubChunk constructor.
__debugInfo()
php
public function __debugInfo() : arraycollectGarbage()
php
public function collectGarbage() : voidgetBiomeArray()
php
public function getBiomeArray() : \pocketmine\world\format\PalettedBlockArraygetBlockLayers()
php
public function getBlockLayers() : arraygetBlockLightArray()
php
public function getBlockLightArray() : \pocketmine\world\format\LightArraygetBlockModificationCount() 5.46.0
php
public function getBlockModificationCount() : intgetBlockSkyLightArray()
php
public function getBlockSkyLightArray() : \pocketmine\world\format\LightArraygetBlockStateId()
php
public function getBlockStateId(int $x, int $y, int $z) : intgetEmptyBlockId()
php
public function getEmptyBlockId() : intReturns the block used as the default. This is assumed to refer to air. If all the blocks in a subchunk layer are equal to this block, the layer is assumed to be empty.
getHighestBlockAt()
php
public function getHighestBlockAt(int $x, int $z) : ?intgetLiquidLayerStateId() 5.46.0
php
public function getLiquidLayerStateId(int $x, int $y, int $z) : intReturns the block state ID in the liquid layer (block layer 1), where vanilla stores the water of waterlogged blocks.
isEmptyAuthoritative()
php
public function isEmptyAuthoritative() : boolReturns whether this subchunk contains any non-air blocks. This function will do a slow check, usually by garbage collecting first. This is typically useful for disk saving.
isEmptyFast()
php
public function isEmptyFast() : boolReturns a non-authoritative bool to indicate whether the chunk contains any blocks. This may report non-empty erroneously if the chunk has been modified and not garbage-collected.
setBlockLightArray()
php
public function setBlockLightArray(\pocketmine\world\format\LightArray $data) : voidsetBlockSkyLightArray()
php
public function setBlockSkyLightArray(\pocketmine\world\format\LightArray $data) : voidsetBlockStateId()
php
public function setBlockStateId(int $x, int $y, int $z, int $block) : voidsetLiquidLayerStateId() 5.46.0
php
public function setLiquidLayerStateId(int $x, int $y, int $z, int $block) : void