From 6480f7a9896d6832028b1ba33747a7ad5e3732b5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 13 Aug 2017 18:20:06 +0100 Subject: [PATCH] Found an unknown field in TextPacket and added some docs --- src/pocketmine/network/mcpe/protocol/TextPacket.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/TextPacket.php b/src/pocketmine/network/mcpe/protocol/TextPacket.php index ace6ea3e9a..b5350fa37f 100644 --- a/src/pocketmine/network/mcpe/protocol/TextPacket.php +++ b/src/pocketmine/network/mcpe/protocol/TextPacket.php @@ -40,15 +40,20 @@ class TextPacket extends DataPacket{ const TYPE_WHISPER = 6; const TYPE_ANNOUNCEMENT = 7; + /** @var int */ public $type; - public $unknownBool = false; + /** @var bool */ + public $needsTranslation = false; + /** @var string */ public $source; + /** @var string */ public $message; + /** @var string[] */ public $parameters = []; protected function decodePayload(){ $this->type = $this->getByte(); - $this->unknownBool = $this->getBool(); + $this->needsTranslation = $this->getBool(); switch($this->type){ case self::TYPE_POPUP: case self::TYPE_CHAT: @@ -73,7 +78,7 @@ class TextPacket extends DataPacket{ protected function encodePayload(){ $this->putByte($this->type); - $this->putBool($this->unknownBool); + $this->putBool($this->needsTranslation); switch($this->type){ case self::TYPE_POPUP: case self::TYPE_CHAT: