mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-24 20:34:02 +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{
|
class UpdateBlockSyncedPacket extends UpdateBlockPacket{
|
||||||
public const NETWORK_ID = ProtocolInfo::UPDATE_BLOCK_SYNCED_PACKET;
|
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 */
|
/** @var int */
|
||||||
public $entityUniqueId = 0;
|
public $entityUniqueId = 0;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $uvarint64_2 = 0;
|
public $updateType = 0;
|
||||||
|
|
||||||
protected function decodePayload(){
|
protected function decodePayload(){
|
||||||
parent::decodePayload();
|
parent::decodePayload();
|
||||||
$this->entityUniqueId = $this->getUnsignedVarLong();
|
$this->entityUniqueId = $this->getUnsignedVarLong();
|
||||||
$this->uvarint64_2 = $this->getUnsignedVarLong();
|
$this->updateType = $this->getUnsignedVarLong();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload(){
|
protected function encodePayload(){
|
||||||
parent::encodePayload();
|
parent::encodePayload();
|
||||||
$this->putUnsignedVarLong($this->entityUniqueId);
|
$this->putUnsignedVarLong($this->entityUniqueId);
|
||||||
$this->putUnsignedVarLong($this->uvarint64_2);
|
$this->putUnsignedVarLong($this->updateType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $session) : bool{
|
public function handle(NetworkSession $session) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user