From 590003d7c1c890ed554f925b0a4e2bc072e331ab Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 9 Aug 2017 19:51:39 +0100 Subject: [PATCH] Fixed PlayerListPacket --- .../network/mcpe/protocol/PlayerListPacket.php | 15 +++++++++------ .../network/mcpe/protocol/PlayerSkinPacket.php | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php b/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php index 4a95aca9d..50515ba2e 100644 --- a/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php +++ b/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php @@ -48,15 +48,17 @@ class PlayerListPacket extends DataPacket{ $this->type = $this->getByte(); $count = $this->getUnsignedVarInt(); for($i = 0; $i < $count; ++$i){ + $this->entries[$i] = []; if($this->type === self::TYPE_ADD){ $this->entries[$i][0] = $this->getUUID(); $this->entries[$i][1] = $this->getEntityUniqueId(); $this->entries[$i][2] = $this->getString(); //name $this->entries[$i][3] = $this->getString(); //skin id $this->entries[$i][4] = $this->getString(); //skin data - $this->entries[$i][5] = $this->getString(); //geometric model - $this->entries[$i][6] = $this->getString(); //geometry data (json) - $this->entries[$i][7] = $this->getString(); //??? + $this->entries[$i][5] = $this->getString(); //cape data + $this->entries[$i][6] = $this->getString(); //geometric model + $this->entries[$i][7] = $this->getString(); //geometry data (json) + $this->entries[$i][8] = $this->getString(); //??? }else{ $this->entries[$i][0] = $this->getUUID(); } @@ -73,9 +75,10 @@ class PlayerListPacket extends DataPacket{ $this->putString($d[2]); //name $this->putString($d[3]); //skin id $this->putString($d[4]); //skin data - $this->putString($d[5] ?? ""); //geometric model - $this->putString($d[6] ?? ""); //geometry data (json) - $this->putString($d[7] ?? ""); //??? + $this->putString($d[5] ?? ""); //cape data + $this->putString($d[6] ?? ""); //geometric model + $this->putString($d[7] ?? ""); //geometry data (json) + $this->putString($d[8] ?? ""); //??? }else{ $this->putUUID($d[0]); } diff --git a/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php b/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php index b5ce40670..eff1c9d48 100644 --- a/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php +++ b/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php @@ -42,7 +42,7 @@ class PlayerSkinPacket extends DataPacket{ /** @var string */ public $skinData; /** @var string */ - public $unknown; + public $capeData; /** @var string */ public $geometryModel; /** @var string */ @@ -55,7 +55,7 @@ class PlayerSkinPacket extends DataPacket{ $this->skinName = $this->getString(); $this->serializeName = $this->getString(); $this->skinData = $this->getString(); - $this->unknown = $this->getString(); + $this->capeData = $this->getString(); $this->geometryModel = $this->getString(); $this->geometryData = $this->getString(); } @@ -66,7 +66,7 @@ class PlayerSkinPacket extends DataPacket{ $this->putString($this->skinName); $this->putString($this->serializeName); $this->putString($this->skinData); - $this->putString($this->unknown); + $this->putString($this->capeData); $this->putString($this->geometryModel); $this->putString($this->geometryData); }