mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Merge commit '816234a37'
# Conflicts: # resources/vanilla # src/network/mcpe/protocol/UpdateBlockSyncedPacket.php
This commit is contained in:
commit
c14069c42b
@ -30,21 +30,25 @@ use pocketmine\network\mcpe\protocol\serializer\NetworkBinaryStream;
|
||||
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(NetworkBinaryStream $in) : void{
|
||||
parent::decodePayload($in);
|
||||
$this->entityUniqueId = $in->getUnsignedVarLong();
|
||||
$this->uvarint64_2 = $in->getUnsignedVarLong();
|
||||
$this->updateType = $in->getUnsignedVarLong();
|
||||
}
|
||||
|
||||
protected function encodePayload(NetworkBinaryStream $out) : void{
|
||||
parent::encodePayload($out);
|
||||
$out->putUnsignedVarLong($this->entityUniqueId);
|
||||
$out->putUnsignedVarLong($this->uvarint64_2);
|
||||
$out->putUnsignedVarLong($this->updateType);
|
||||
}
|
||||
|
||||
public function handle(PacketHandlerInterface $handler) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user