13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol\types\resourcepacks;
20 public function __construct(
21 private string $packId,
22 private string $version,
23 private int $sizeBytes,
24 private string $encryptionKey =
"",
25 private string $subPackName =
"",
26 private string $contentId =
"",
27 private bool $hasScripts =
false,
28 private bool $isAddonPack =
false
31 public function getPackId() :
string{
35 public function getVersion() :
string{
36 return $this->version;
39 public function getSizeBytes() :
int{
40 return $this->sizeBytes;
43 public function getEncryptionKey() :
string{
44 return $this->encryptionKey;
47 public function getSubPackName() :
string{
48 return $this->subPackName;
51 public function getContentId() :
string{
52 return $this->contentId;
55 public function hasScripts() :
bool{
56 return $this->hasScripts;
59 public function isAddonPack() :
bool{
return $this->isAddonPack; }
62 $out->putString($this->packId);
63 $out->putString($this->version);
64 $out->putLLong($this->sizeBytes);
65 $out->putString($this->encryptionKey);
66 $out->putString($this->subPackName);
67 $out->putString($this->contentId);
68 $out->putBool($this->hasScripts);
69 $out->putBool($this->isAddonPack);
81 return new self($uuid, $version, $sizeBytes, $encryptionKey, $subPackName, $contentId, $hasScripts, $isAddonPack);