Rename NetworkBinaryStream -> PacketSerializer

This commit is contained in:
Dylan K. Taylor
2020-06-17 11:31:13 +01:00
parent c6557f0222
commit 6c096c44aa
176 changed files with 575 additions and 564 deletions

View File

@ -25,7 +25,7 @@ namespace pocketmine\network\mcpe\protocol;
#include <rules/DataPacket.h>
use pocketmine\network\mcpe\protocol\serializer\NetworkBinaryStream;
use pocketmine\network\mcpe\protocol\serializer\PacketSerializer;
class PlayerActionPacket extends DataPacket implements ServerboundPacket{
public const NETWORK_ID = ProtocolInfo::PLAYER_ACTION_PACKET;
@ -70,14 +70,14 @@ class PlayerActionPacket extends DataPacket implements ServerboundPacket{
/** @var int */
public $face;
protected function decodePayload(NetworkBinaryStream $in) : void{
protected function decodePayload(PacketSerializer $in) : void{
$this->entityRuntimeId = $in->getEntityRuntimeId();
$this->action = $in->getVarInt();
$in->getBlockPosition($this->x, $this->y, $this->z);
$this->face = $in->getVarInt();
}
protected function encodePayload(NetworkBinaryStream $out) : void{
protected function encodePayload(PacketSerializer $out) : void{
$out->putEntityRuntimeId($this->entityRuntimeId);
$out->putVarInt($this->action);
$out->putBlockPosition($this->x, $this->y, $this->z);