13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_DATA_INFO_PACKET;
23 public string $packId;
24 public int $maxChunkSize;
25 public int $chunkCount;
26 public int $compressedPackSize;
27 public string $sha256;
28 public bool $isPremium =
false;
29 public int $packType = ResourcePackType::RESOURCES;
38 int $compressedPackSize,
44 $result->packId = $packId;
45 $result->maxChunkSize = $maxChunkSize;
46 $result->chunkCount = $chunkCount;
47 $result->compressedPackSize = $compressedPackSize;
48 $result->sha256 = $sha256;
49 $result->isPremium = $isPremium;
50 $result->packType = $packType;
55 $this->packId = $in->getString();
56 $this->maxChunkSize = $in->
getLInt();
57 $this->chunkCount = $in->
getLInt();
58 $this->compressedPackSize = $in->
getLLong();
60 $this->isPremium = $in->
getBool();
61 $this->packType = $in->
getByte();
65 $out->putString($this->packId);
66 $out->putLInt($this->maxChunkSize);
67 $out->putLInt($this->chunkCount);
68 $out->putLLong($this->compressedPackSize);
69 $out->putString($this->sha256);
70 $out->putBool($this->isPremium);
71 $out->putByte($this->packType);
75 return $handler->handleResourcePackDataInfo($this);
encodePayload(PacketSerializer $out)
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)
static create(string $packId, int $maxChunkSize, int $chunkCount, int $compressedPackSize, string $sha256, bool $isPremium, int $packType,)