From ac482621a108bfde0919e58d5aced382a760e719 Mon Sep 17 00:00:00 2001 From: Intyre Date: Thu, 28 Apr 2016 01:50:54 +0200 Subject: [PATCH] Bump version to 0.14.2.0 and protocol changes --- src/pocketmine/Player.php | 2 ++ src/pocketmine/PocketMine.php | 4 ++-- src/pocketmine/network/protocol/AdventureSettingsPacket.php | 4 ++++ src/pocketmine/network/protocol/Info.php | 2 +- src/pocketmine/network/protocol/StartGamePacket.php | 4 ++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 7cdf04eb5..076fb1363 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1177,6 +1177,8 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade $pk = new AdventureSettingsPacket(); $pk->flags = $flags; + $pk->userPermission = 2; + $pk->globalPermission = 2; $this->dataPacket($pk); } diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 67040f078..766eda05d 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -75,8 +75,8 @@ namespace pocketmine { const VERSION = "1.6dev"; const API_VERSION = "2.0.0"; const CODENAME = "[REDACTED]"; - const MINECRAFT_VERSION = "v0.14.0.0 alpha"; - const MINECRAFT_VERSION_NETWORK = "0.14.0.0"; + const MINECRAFT_VERSION = "v0.14.2.0 alpha"; + const MINECRAFT_VERSION_NETWORK = "0.14.2.0"; /* * Startup code. Do not look at it, it may harm you. diff --git a/src/pocketmine/network/protocol/AdventureSettingsPacket.php b/src/pocketmine/network/protocol/AdventureSettingsPacket.php index b07d03ee3..410966a26 100644 --- a/src/pocketmine/network/protocol/AdventureSettingsPacket.php +++ b/src/pocketmine/network/protocol/AdventureSettingsPacket.php @@ -28,6 +28,8 @@ class AdventureSettingsPacket extends DataPacket{ const NETWORK_ID = Info::ADVENTURE_SETTINGS_PACKET; public $flags; + public $userPermission; + public $globalPermission; public function decode(){ @@ -36,6 +38,8 @@ class AdventureSettingsPacket extends DataPacket{ public function encode(){ $this->reset(); $this->putInt($this->flags); + $this->putInt($this->userPermission); + $this->putInt($this->globalPermission); } } \ No newline at end of file diff --git a/src/pocketmine/network/protocol/Info.php b/src/pocketmine/network/protocol/Info.php index 3dc2d68ce..7e7579848 100644 --- a/src/pocketmine/network/protocol/Info.php +++ b/src/pocketmine/network/protocol/Info.php @@ -30,7 +30,7 @@ interface Info{ /** * Actual Minecraft: PE protocol version */ - const CURRENT_PROTOCOL = 45; + const CURRENT_PROTOCOL = 60; const LOGIN_PACKET = 0x8f; const PLAY_STATUS_PACKET = 0x90; diff --git a/src/pocketmine/network/protocol/StartGamePacket.php b/src/pocketmine/network/protocol/StartGamePacket.php index 28df2ec1c..e38e4c3b2 100644 --- a/src/pocketmine/network/protocol/StartGamePacket.php +++ b/src/pocketmine/network/protocol/StartGamePacket.php @@ -38,6 +38,7 @@ class StartGamePacket extends DataPacket{ public $x; public $y; public $z; + public $unknown; public function decode(){ @@ -56,7 +57,10 @@ class StartGamePacket extends DataPacket{ $this->putFloat($this->x); $this->putFloat($this->y); $this->putFloat($this->z); + $this->putByte(1); + $this->putByte(1); $this->putByte(0); + $this->putString($this->unknown); } }