From 05530bedc67b0ca82ca1c6dde1129ac4c909d59f Mon Sep 17 00:00:00 2001 From: Intyre Date: Tue, 16 Feb 2016 00:43:59 +0100 Subject: [PATCH] Bump to 0.14.0.7, new packets and fixes --- src/pocketmine/PocketMine.php | 4 ++-- src/pocketmine/network/protocol/ContainerSetSlotPacket.php | 2 +- src/pocketmine/network/protocol/Info.php | 4 +++- src/pocketmine/utils/BinaryStream.php | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index df1e2a058..92e5d084a 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.1 alpha"; - const MINECRAFT_VERSION_NETWORK = "0.14.0.1"; + const MINECRAFT_VERSION = "v0.14.0.7 alpha"; + const MINECRAFT_VERSION_NETWORK = "0.14.0.7"; /* * Startup code. Do not look at it, it may harm you. diff --git a/src/pocketmine/network/protocol/ContainerSetSlotPacket.php b/src/pocketmine/network/protocol/ContainerSetSlotPacket.php index 43c4d1c34..2cf8bfca0 100644 --- a/src/pocketmine/network/protocol/ContainerSetSlotPacket.php +++ b/src/pocketmine/network/protocol/ContainerSetSlotPacket.php @@ -37,7 +37,7 @@ class ContainerSetSlotPacket extends DataPacket{ public function decode(){ $this->windowid = $this->getByte(); $this->slot = $this->getShort(); - $this->hotboarSlot = $this->getShort(); + $this->hotbarSlot = $this->getShort(); $this->item = $this->getSlot(); } diff --git a/src/pocketmine/network/protocol/Info.php b/src/pocketmine/network/protocol/Info.php index bcc627ba9..751b867bb 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 = 41; + const CURRENT_PROTOCOL = 45; const LOGIN_PACKET = 0x8f; const PLAY_STATUS_PACKET = 0x90; @@ -91,6 +91,8 @@ interface Info{ // const MAP_INFO_REQUEST_PACKET = 0xc7; // const REQUEST_CHUNK_RADIUS_PACKET = 0xc8; // const CHUNK_RADIUS_UPDATE_PACKET = 0xc9; + // const ITEM_FRAME_DROP_ITEM_PACKET = 0xca; + // const REPLACE_SELECTED_ITEM_PACKET = 0xcb; } diff --git a/src/pocketmine/utils/BinaryStream.php b/src/pocketmine/utils/BinaryStream.php index d4ec2a96e..30c5dca73 100644 --- a/src/pocketmine/utils/BinaryStream.php +++ b/src/pocketmine/utils/BinaryStream.php @@ -206,7 +206,7 @@ class BinaryStream extends \stdClass{ $data = $this->getShort(); - $nbtLen = $this->getShort(); + $nbtLen = $this->getLShort(); $nbt = ""; @@ -232,7 +232,7 @@ class BinaryStream extends \stdClass{ $this->putByte($item->getCount()); $this->putShort($item->getDamage() === null ? -1 : $item->getDamage()); $nbt = $item->getCompoundTag(); - $this->putShort(strlen($nbt)); + $this->putLShort(strlen($nbt)); $this->put($nbt); }