diff --git a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php index 8bbbba0239..aaafda6276 100644 --- a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php +++ b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php @@ -53,13 +53,16 @@ class AddPlayerPacket extends DataPacket{ public $item; public $metadata = []; - //TODO + //TODO: adventure settings stuff public $uvarint1 = 0; public $uvarint2 = 0; public $uvarint3 = 0; public $uvarint4 = 0; + public $long1 = 0; + public $links = []; + protected function decodePayload(){ $this->uuid = $this->getUUID(); $this->username = $this->getString(); @@ -77,7 +80,13 @@ class AddPlayerPacket extends DataPacket{ $this->uvarint2 = $this->getUnsignedVarInt(); $this->uvarint3 = $this->getUnsignedVarInt(); $this->uvarint4 = $this->getUnsignedVarInt(); + $this->long1 = $this->getLLong(); + + $linkCount = $this->getUnsignedVarInt(); + for($i = 0; $i < $linkCount; ++$i){ + $this->links[$i] = $this->getEntityLink(); + } } protected function encodePayload(){ @@ -97,7 +106,13 @@ class AddPlayerPacket extends DataPacket{ $this->putUnsignedVarInt($this->uvarint2); $this->putUnsignedVarInt($this->uvarint3); $this->putUnsignedVarInt($this->uvarint4); + $this->putLLong($this->long1); + + $this->putUnsignedVarInt(count($this->links)); + foreach($this->links as $link){ + $this->putEntityLink($link); + } } 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 b95b4a9eb6..20dc3dab69 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 */ - const CURRENT_PROTOCOL = 131; + const CURRENT_PROTOCOL = 132; /** * Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */ - const MINECRAFT_VERSION = 'v1.2.0.7 beta'; + const MINECRAFT_VERSION = 'v1.2.0.11 beta'; /** * Version number sent to clients in ping responses. */ - const MINECRAFT_VERSION_NETWORK = '1.2.0.7'; + const MINECRAFT_VERSION_NETWORK = '1.2.0.11'; const LOGIN_PACKET = 0x01; const PLAY_STATUS_PACKET = 0x02; diff --git a/src/pocketmine/network/mcpe/protocol/ShowStoreOfferPacket.php b/src/pocketmine/network/mcpe/protocol/ShowStoreOfferPacket.php index 2d58efd3a7..f8871ac565 100644 --- a/src/pocketmine/network/mcpe/protocol/ShowStoreOfferPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ShowStoreOfferPacket.php @@ -31,13 +31,19 @@ class ShowStoreOfferPacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::SHOW_STORE_OFFER_PACKET; public $offerId; + public $unknownBool; + public $unknownString; protected function decodePayload(){ $this->offerId = $this->getString(); + $this->unknownBool = $this->getBool(); + $this->unknownString = $this->getString(); } protected function encodePayload(){ $this->putString($this->offerId); + $this->putBool($this->unknownBool); + $this->putString($this->unknownString); } public function handle(NetworkSession $session) : bool{ diff --git a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php index 0d6d309a9e..b12c5bf466 100644 --- a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php +++ b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php @@ -63,6 +63,7 @@ class StartGamePacket extends DataPacket{ public $isTexturePacksRequired = true; public $gameRules = []; //TODO: implement this public $hasBonusChestEnabled = false; + public $hasStartWithMapEnabled = false; public $hasTrustPlayersEnabled = false; public $defaultPlayerPermission = PlayerPermissions::MEMBER; //TODO public $xboxLiveBroadcastMode = 0; //TODO: find values @@ -104,6 +105,7 @@ class StartGamePacket extends DataPacket{ $this->isTexturePacksRequired = $this->getBool(); $this->gameRules = $this->getGameRules(); $this->hasBonusChestEnabled = $this->getBool(); + $this->hasStartWithMapEnabled = $this->getBool(); $this->hasTrustPlayersEnabled = $this->getBool(); $this->defaultPlayerPermission = $this->getVarInt(); $this->xboxLiveBroadcastMode = $this->getVarInt(); @@ -146,6 +148,7 @@ class StartGamePacket extends DataPacket{ $this->putBool($this->isTexturePacksRequired); $this->putGameRules($this->gameRules); $this->putBool($this->hasBonusChestEnabled); + $this->putBool($this->hasStartWithMapEnabled); $this->putBool($this->hasTrustPlayersEnabled); $this->putVarInt($this->defaultPlayerPermission); $this->putVarInt($this->xboxLiveBroadcastMode);