UpdateBlockSyncedPacket: populate missing information for second field

This commit is contained in:
Dylan K. Taylor 2020-05-20 13:57:08 +01:00
parent b7bf92a5e9
commit 816234a379

View File

@ -30,21 +30,25 @@ use pocketmine\network\mcpe\NetworkSession;
class UpdateBlockSyncedPacket extends UpdateBlockPacket{
public const NETWORK_ID = ProtocolInfo::UPDATE_BLOCK_SYNCED_PACKET;
public const TYPE_NONE = 0;
public const TYPE_CREATE = 1;
public const TYPE_DESTROY = 2;
/** @var int */
public $entityUniqueId = 0;
/** @var int */
public $uvarint64_2 = 0;
public $updateType = 0;
protected function decodePayload(){
parent::decodePayload();
$this->entityUniqueId = $this->getUnsignedVarLong();
$this->uvarint64_2 = $this->getUnsignedVarLong();
$this->updateType = $this->getUnsignedVarLong();
}
protected function encodePayload(){
parent::encodePayload();
$this->putUnsignedVarLong($this->entityUniqueId);
$this->putUnsignedVarLong($this->uvarint64_2);
$this->putUnsignedVarLong($this->updateType);
}
public function handle(NetworkSession $session) : bool{