mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-20 10:00:31 +00:00
Merge branch 'stable'
This commit is contained in:
commit
f2a320bb5c
@ -66,23 +66,23 @@ class ClientCacheBlobStatusPacket extends DataPacket implements ServerboundPacke
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function decodePayload(PacketSerializer $in) : void{
|
protected function decodePayload(PacketSerializer $in) : void{
|
||||||
$hitCount = $in->getUnsignedVarInt();
|
|
||||||
$missCount = $in->getUnsignedVarInt();
|
$missCount = $in->getUnsignedVarInt();
|
||||||
for($i = 0; $i < $hitCount; ++$i){
|
$hitCount = $in->getUnsignedVarInt();
|
||||||
$this->hitHashes[] = $in->getLLong();
|
|
||||||
}
|
|
||||||
for($i = 0; $i < $missCount; ++$i){
|
for($i = 0; $i < $missCount; ++$i){
|
||||||
$this->missHashes[] = $in->getLLong();
|
$this->missHashes[] = $in->getLLong();
|
||||||
}
|
}
|
||||||
|
for($i = 0; $i < $hitCount; ++$i){
|
||||||
|
$this->hitHashes[] = $in->getLLong();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload(PacketSerializer $out) : void{
|
protected function encodePayload(PacketSerializer $out) : void{
|
||||||
$out->putUnsignedVarInt(count($this->hitHashes));
|
|
||||||
$out->putUnsignedVarInt(count($this->missHashes));
|
$out->putUnsignedVarInt(count($this->missHashes));
|
||||||
foreach($this->hitHashes as $hash){
|
$out->putUnsignedVarInt(count($this->hitHashes));
|
||||||
|
foreach($this->missHashes as $hash){
|
||||||
$out->putLLong($hash);
|
$out->putLLong($hash);
|
||||||
}
|
}
|
||||||
foreach($this->missHashes as $hash){
|
foreach($this->hitHashes as $hash){
|
||||||
$out->putLLong($hash);
|
$out->putLLong($hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user