PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\network\mcpe\serializer\ChunkSerializer Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\serializer\ChunkSerializer:

Static Public Member Functions

static getDimensionChunkBounds (int $dimensionId)
 
static getSubChunkCount (Chunk $chunk, int $dimensionId)
 
static serializeFullChunk (Chunk $chunk, int $dimensionId, BlockTranslator $blockTranslator, ?string $tiles=null)
 
static serializeSubChunk (SubChunk $subChunk, BlockTranslator $blockTranslator, PacketSerializer $stream, bool $persistentBlockStates)
 
static serializeTiles (Chunk $chunk)
 

Detailed Description

Definition at line 41 of file ChunkSerializer.php.

Member Function Documentation

◆ getDimensionChunkBounds()

static pocketmine\network\mcpe\serializer\ChunkSerializer::getDimensionChunkBounds ( int $dimensionId)
static

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

@phpstan-param DimensionIds::* $dimensionId

Returns
int[] @phpstan-return array{int, int}

Definition at line 54 of file ChunkSerializer.php.

◆ getSubChunkCount()

static pocketmine\network\mcpe\serializer\ChunkSerializer::getSubChunkCount ( Chunk $chunk,
int $dimensionId )
static

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.

@phpstan-param DimensionIds::* $dimensionId

Definition at line 69 of file ChunkSerializer.php.

◆ serializeFullChunk()

static pocketmine\network\mcpe\serializer\ChunkSerializer::serializeFullChunk ( Chunk $chunk,
int $dimensionId,
BlockTranslator $blockTranslator,
?string $tiles = null )
static

@phpstan-param DimensionIds::* $dimensionId

Definition at line 86 of file ChunkSerializer.php.

◆ serializeSubChunk()

static pocketmine\network\mcpe\serializer\ChunkSerializer::serializeSubChunk ( SubChunk $subChunk,
BlockTranslator $blockTranslator,
PacketSerializer $stream,
bool $persistentBlockStates )
static

Definition at line 114 of file ChunkSerializer.php.

◆ serializeTiles()

static pocketmine\network\mcpe\serializer\ChunkSerializer::serializeTiles ( Chunk $chunk)
static

Definition at line 176 of file ChunkSerializer.php.


The documentation for this class was generated from the following file: