Skip to content

ChunkSerializer ​

final class · pocketmine\network\mcpe\serializer\ChunkSerializer · source

Methods ​

getDimensionChunkBounds() ​

php
public static function getDimensionChunkBounds(int $dimensionId) : array

Returns the min/max subchunk index expected in the protocol. This has no relation to the world height supported by PM.

getSubChunkCount() ​

php
public static function getSubChunkCount(\pocketmine\world\format\Chunk $chunk, int $dimensionId) : int

Returns the number of subchunks that will be sent from the given chunk. Chunks are sent in a stack, so every chunk below the top non-empty one must be sent.

serializeFullChunk() ​

php
public static function serializeFullChunk(\pocketmine\world\format\Chunk $chunk, int $dimensionId, \pocketmine\network\mcpe\convert\BlockTranslator $blockTranslator, ?string $tiles = null) : string

serializeSubChunk() ​

php
public static function serializeSubChunk(\pocketmine\world\format\SubChunk $subChunk, \pocketmine\network\mcpe\convert\BlockTranslator $blockTranslator, \pmmp\encoding\ByteBufferWriter $stream, bool $persistentBlockStates) : void

serializeTiles() ​

php
public static function serializeTiles(\pocketmine\world\format\Chunk $chunk) : string

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