ChunkSerializer
in package
Table of Contents
- LOWER_PADDING_SIZE = 4
- getSubChunkCount() : int
- Returns the number of subchunks that will be sent from the given chunk.
- serializeFullChunk() : string
- serializeSubChunk() : void
- serializeTiles() : string
- __construct() : mixed
- serializeBiomesAsPalette() : string
Constants
LOWER_PADDING_SIZE
public
mixed
LOWER_PADDING_SIZE
= 4
Methods
getSubChunkCount()
Returns the number of subchunks that will be sent from the given chunk.
public
static getSubChunkCount(Chunk $chunk) : int
Chunks are sent in a stack, so every chunk below the top non-empty one must be sent.
Parameters
- $chunk : Chunk
Return values
int —serializeFullChunk()
public
static serializeFullChunk(Chunk $chunk, RuntimeBlockMapping $blockMapper, PacketSerializerContext $encoderContext[, string|null $tiles = null ]) : string
Parameters
- $chunk : Chunk
- $blockMapper : RuntimeBlockMapping
- $encoderContext : PacketSerializerContext
- $tiles : string|null = null
Return values
string —serializeSubChunk()
public
static serializeSubChunk(SubChunk $subChunk, RuntimeBlockMapping $blockMapper, PacketSerializer $stream, bool $persistentBlockStates) : void
Parameters
- $subChunk : SubChunk
- $blockMapper : RuntimeBlockMapping
- $stream : PacketSerializer
- $persistentBlockStates : bool
Return values
void —serializeTiles()
public
static serializeTiles(Chunk $chunk) : string
Parameters
- $chunk : Chunk
Return values
string —__construct()
private
__construct() : mixed
Return values
mixed —serializeBiomesAsPalette()
private
static serializeBiomesAsPalette(Chunk $chunk) : string
Parameters
- $chunk : Chunk