From 137972098ff0fa9b9d7a2eecca9630fb47f2201c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 27 Oct 2016 14:05:49 +0100 Subject: [PATCH] Fixes for AnimatePacket and added TextPacket::TYPE_WHISPER constant --- src/pocketmine/network/protocol/AnimatePacket.php | 4 ++-- src/pocketmine/network/protocol/TextPacket.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/protocol/AnimatePacket.php b/src/pocketmine/network/protocol/AnimatePacket.php index 857582062..9ca3c72c0 100644 --- a/src/pocketmine/network/protocol/AnimatePacket.php +++ b/src/pocketmine/network/protocol/AnimatePacket.php @@ -31,13 +31,13 @@ class AnimatePacket extends DataPacket{ public $eid; public function decode(){ - $this->action = $this->getByte(); + $this->action = $this->getVarInt(); $this->eid = $this->getEntityId(); } public function encode(){ $this->reset(); - $this->putByte($this->action); + $this->putVarInt($this->action); $this->putEntityId($this->eid); } diff --git a/src/pocketmine/network/protocol/TextPacket.php b/src/pocketmine/network/protocol/TextPacket.php index c3bf9084f..0e5898a93 100644 --- a/src/pocketmine/network/protocol/TextPacket.php +++ b/src/pocketmine/network/protocol/TextPacket.php @@ -33,6 +33,7 @@ class TextPacket extends DataPacket{ const TYPE_POPUP = 3; const TYPE_TIP = 4; const TYPE_SYSTEM = 5; + const TYPE_WHISPER = 6; public $type; public $source;