13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CHUNK_DATA_PACKET;
22 public string $packId;
23 public int $chunkIndex;
30 public static function create(
string $packId,
int $chunkIndex,
int $offset,
string $data) : self{
32 $result->packId = $packId;
33 $result->chunkIndex = $chunkIndex;
34 $result->offset = $offset;
35 $result->data = $data;
40 $this->packId = $in->getString();
41 $this->chunkIndex = $in->
getLInt();
47 $out->putString($this->packId);
48 $out->putLInt($this->chunkIndex);
49 $out->putLLong($this->offset);
50 $out->putString($this->data);
54 return $handler->handleResourcePackChunkData($this);
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
static create(string $packId, int $chunkIndex, int $offset, string $data)
handle(PacketHandlerInterface $handler)