Skip to content

SubChunk ​

class · pocketmine\world\format\SubChunk · source

Constants ​

COORD_BIT_SIZE ​

php
public const COORD_BIT_SIZE = 4

COORD_MASK ​

php
public const COORD_MASK = ~(~0 << self::COORD_BIT_SIZE)

EDGE_LENGTH ​

php
public const EDGE_LENGTH = 1 << self::COORD_BIT_SIZE

Methods ​

__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() : array

collectGarbage() ​

php
public function collectGarbage() : void

getBiomeArray() ​

php
public function getBiomeArray() : \pocketmine\world\format\PalettedBlockArray

getBlockLayers() ​

php
public function getBlockLayers() : array

getBlockLightArray() ​

php
public function getBlockLightArray() : \pocketmine\world\format\LightArray

getBlockModificationCount() 5.46.0 ​

php
public function getBlockModificationCount() : int

getBlockSkyLightArray() ​

php
public function getBlockSkyLightArray() : \pocketmine\world\format\LightArray

getBlockStateId() ​

php
public function getBlockStateId(int $x, int $y, int $z) : int

getEmptyBlockId() ​

php
public function getEmptyBlockId() : int

Returns 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) : ?int

getLiquidLayerStateId() 5.46.0 ​

php
public function getLiquidLayerStateId(int $x, int $y, int $z) : int

Returns the block state ID in the liquid layer (block layer 1), where vanilla stores the water of waterlogged blocks.

isEmptyAuthoritative() ​

php
public function isEmptyAuthoritative() : bool

Returns 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() : bool

Returns 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) : void

setBlockSkyLightArray() ​

php
public function setBlockSkyLightArray(\pocketmine\world\format\LightArray $data) : void

setBlockStateId() ​

php
public function setBlockStateId(int $x, int $y, int $z, int $block) : void

setLiquidLayerStateId() 5.46.0 ​

php
public function setLiquidLayerStateId(int $x, int $y, int $z, int $block) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.