22declare(strict_types=1);
24namespace pocketmine\network\mcpe;
42 private const TLS_KEY_PROMISE =
"promise";
44 protected string $chunk;
45 protected int $chunkX;
46 protected int $chunkZ;
48 private int $dimensionId;
51 private string $tiles;
60 $this->chunkX = $chunkX;
61 $this->chunkZ = $chunkZ;
62 $this->dimensionId = $dimensionId;
63 $this->tiles = ChunkSerializer::serializeTiles($chunk);
65 $this->
storeLocal(self::TLS_KEY_PROMISE, $promise);
70 $dimensionId = $this->dimensionId;
73 $converter = TypeConverter::getInstance();
85 $promise = $this->fetchLocal(self::TLS_KEY_PROMISE);
86 $promise->resolve($this->getResult());
NonThreadSafeValue $compressor
__construct(int $chunkX, int $chunkZ, int $dimensionId, Chunk $chunk, CompressBatchPromise $promise, Compressor $compressor)
static create(ChunkPosition $chunkPosition, int $dimensionId, int $subChunkCount, bool $clientSubChunkRequestsEnabled, ?array $usedBlobHashes, string $extraPayload)
static encodePackets(BinaryStream $stream, array $packets)
static serializeFullChunk(Chunk $chunk, int $dimensionId, BlockTranslator $blockTranslator, ?string $tiles=null)
static getSubChunkCount(Chunk $chunk, int $dimensionId)
storeLocal(string $key, mixed $complexData)