13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::CLIENT_CACHE_BLOB_STATUS_PACKET;
24 private array $hitHashes = [];
26 private array $missHashes = [];
33 public static function create(array $hitHashes, array $missHashes) : self{
35 $result->hitHashes = $hitHashes;
36 $result->missHashes = $missHashes;
44 return $this->hitHashes;
51 return $this->missHashes;
55 $missCount = $in->getUnsignedVarInt();
57 for($i = 0; $i < $missCount; ++$i){
58 $this->missHashes[] = $in->
getLLong();
60 for($i = 0; $i < $hitCount; ++$i){
61 $this->hitHashes[] = $in->
getLLong();
66 $out->putUnsignedVarInt(count($this->missHashes));
68 foreach($this->missHashes as $hash){
69 $out->putLLong($hash);
71 foreach($this->hitHashes as $hash){
72 $out->putLLong($hash);
77 return $handler->handleClientCacheBlobStatus($this);
static create(array $hitHashes, array $missHashes)
handle(PacketHandlerInterface $handler)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
putUnsignedVarInt(int $v)