mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
UpdateBlockSyncedPacket: populate missing information for second field
This commit is contained in:
parent
b7bf92a5e9
commit
816234a379
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user