diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 695ddf907..7cc5b1dc4 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2025,7 +2025,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ case ResourcePackClientResponsePacket::STATUS_SEND_PACKS: $manager = $this->server->getResourcePackManager(); foreach($packet->packIds as $uuid){ - $pack = $manager->getPackById($uuid); + $pack = $manager->getPackById(substr($uuid, 0, strpos($uuid, "_"))); //dirty hack for mojang's dirty hack for versions if(!($pack instanceof ResourcePack)){ //Client requested a resource pack but we don't have it available on the server $this->close("", "disconnectionScreen.resourcePack", true); diff --git a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php index 2394bbd6b..537e1d543 100644 --- a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php +++ b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php @@ -75,6 +75,9 @@ class AddPlayerPacket extends DataPacket{ /** @var EntityLink[] */ public $links = []; + /** @var string */ + public $deviceId = ""; //TODO: fill player's device ID (???) + protected function decodePayload(){ $this->uuid = $this->getUUID(); $this->username = $this->getString(); @@ -103,6 +106,8 @@ class AddPlayerPacket extends DataPacket{ for($i = 0; $i < $linkCount; ++$i){ $this->links[$i] = $this->getEntityLink(); } + + $this->deviceId = $this->getString(); } protected function encodePayload(){ @@ -133,6 +138,8 @@ class AddPlayerPacket extends DataPacket{ foreach($this->links as $link){ $this->putEntityLink($link); } + + $this->putString($this->deviceId); } public function handle(NetworkSession $session) : bool{ diff --git a/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php b/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php index 27b4e3eb6..d7cc21f51 100644 --- a/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php +++ b/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php @@ -39,15 +39,15 @@ interface ProtocolInfo{ /** * Actual Minecraft: PE protocol version */ - public const CURRENT_PROTOCOL = 281; + public const CURRENT_PROTOCOL = 282; /** * Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */ - public const MINECRAFT_VERSION = 'v1.6.0.5 beta'; + public const MINECRAFT_VERSION = 'v1.6.0.8 beta'; /** * Version number sent to clients in ping responses. */ - public const MINECRAFT_VERSION_NETWORK = '1.6.0.5'; + public const MINECRAFT_VERSION_NETWORK = '1.6.0.8'; public const LOGIN_PACKET = 0x01; public const PLAY_STATUS_PACKET = 0x02; diff --git a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php index 43a7614c7..1c016a2c2 100644 --- a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php +++ b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php @@ -129,6 +129,8 @@ class StartGamePacket extends DataPacket{ public $currentTick = 0; //only used if isTrial is true /** @var int */ public $enchantmentSeed = 0; + /** @var string */ + public $multiplayerCorrelationId = ""; //TODO: this should be filled with a UUID of some sort protected function decodePayload(){ $this->entityUniqueId = $this->getEntityUniqueId(); @@ -185,6 +187,8 @@ class StartGamePacket extends DataPacket{ $this->getString(); $this->getLShort(); } + + $this->multiplayerCorrelationId = $this->getString(); } protected function encodePayload(){ @@ -249,6 +253,8 @@ class StartGamePacket extends DataPacket{ self::$runtimeIdTable = $stream->buffer; } $this->put(self::$runtimeIdTable); + + $this->putString($this->multiplayerCorrelationId); } public function handle(NetworkSession $session) : bool{