diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index edd8a6214..8de5b45f9 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1833,7 +1833,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade } $this->randomClientId = $packet->clientId; - $this->loginData = ["clientId" => $packet->clientId, "loginData" => null]; $this->uuid = $packet->clientUUID; $this->rawUUID = $this->uuid->toBinary(); @@ -2863,7 +2862,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade } break; - case ProtocolInfo::TILE_ENTITY_DATA_PACKET: + case ProtocolInfo::BLOCK_ENTITY_DATA_PACKET: if($this->spawned === false or $this->blocked === true or !$this->isAlive()){ break; } diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 98b4e3302..b284c885f 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -75,8 +75,8 @@ namespace pocketmine { const VERSION = "1.6dev"; const API_VERSION = "1.13.0"; const CODENAME = "[REDACTED]"; - const MINECRAFT_VERSION = "v0.12.1 alpha"; - const MINECRAFT_VERSION_NETWORK = "0.12.1"; + const MINECRAFT_VERSION = "v0.13.0 alpha"; + const MINECRAFT_VERSION_NETWORK = "0.13.0"; /* * Startup code. Do not look at it, it may harm you. diff --git a/src/pocketmine/network/Network.php b/src/pocketmine/network/Network.php index 8540d56b7..729f7c5be 100644 --- a/src/pocketmine/network/Network.php +++ b/src/pocketmine/network/Network.php @@ -43,7 +43,7 @@ use pocketmine\network\protocol\DropItemPacket; use pocketmine\network\protocol\FullChunkDataPacket; use pocketmine\network\protocol\Info; use pocketmine\network\protocol\SetEntityLinkPacket; -use pocketmine\network\protocol\TileEntityDataPacket; +use pocketmine\network\protocol\BlockEntityDataPacket; use pocketmine\network\protocol\EntityEventPacket; use pocketmine\network\protocol\ExplodePacket; use pocketmine\network\protocol\HurtArmorPacket; @@ -71,7 +71,7 @@ use pocketmine\network\protocol\SetSpawnPositionPacket; use pocketmine\network\protocol\SetTimePacket; use pocketmine\network\protocol\StartGamePacket; use pocketmine\network\protocol\TakeItemEntityPacket; -use pocketmine\network\protocol\TileEventPacket; +use pocketmine\network\protocol\BlockEventPacket; use pocketmine\network\protocol\UpdateBlockPacket; use pocketmine\network\protocol\UseItemPacket; use pocketmine\network\protocol\PlayerListPacket; @@ -325,7 +325,7 @@ class Network{ $this->registerPacket(ProtocolInfo::ADD_PAINTING_PACKET, AddPaintingPacket::class); $this->registerPacket(ProtocolInfo::EXPLODE_PACKET, ExplodePacket::class); $this->registerPacket(ProtocolInfo::LEVEL_EVENT_PACKET, LevelEventPacket::class); - $this->registerPacket(ProtocolInfo::TILE_EVENT_PACKET, TileEventPacket::class); + $this->registerPacket(ProtocolInfo::BLOCK_EVENT_PACKET, BlockEventPacket::class); $this->registerPacket(ProtocolInfo::ENTITY_EVENT_PACKET, EntityEventPacket::class); $this->registerPacket(ProtocolInfo::MOB_EQUIPMENT_PACKET, MobEquipmentPacket::class); $this->registerPacket(ProtocolInfo::MOB_ARMOR_EQUIPMENT_PACKET, MobArmorEquipmentPacket::class); @@ -349,7 +349,7 @@ class Network{ $this->registerPacket(ProtocolInfo::CRAFTING_DATA_PACKET, CraftingDataPacket::class); $this->registerPacket(ProtocolInfo::CRAFTING_EVENT_PACKET, CraftingEventPacket::class); $this->registerPacket(ProtocolInfo::ADVENTURE_SETTINGS_PACKET, AdventureSettingsPacket::class); - $this->registerPacket(ProtocolInfo::TILE_ENTITY_DATA_PACKET, TileEntityDataPacket::class); + $this->registerPacket(ProtocolInfo::BLOCK_ENTITY_DATA_PACKET, BlockEntityDataPacket::class); $this->registerPacket(ProtocolInfo::FULL_CHUNK_DATA_PACKET, FullChunkDataPacket::class); $this->registerPacket(ProtocolInfo::SET_DIFFICULTY_PACKET, SetDifficultyPacket::class); $this->registerPacket(ProtocolInfo::PLAYER_LIST_PACKET, PlayerListPacket::class); diff --git a/src/pocketmine/network/protocol/TileEntityDataPacket.php b/src/pocketmine/network/protocol/BlockEntityDataPacket.php similarity index 89% rename from src/pocketmine/network/protocol/TileEntityDataPacket.php rename to src/pocketmine/network/protocol/BlockEntityDataPacket.php index 65f04b738..668da2eea 100644 --- a/src/pocketmine/network/protocol/TileEntityDataPacket.php +++ b/src/pocketmine/network/protocol/BlockEntityDataPacket.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -24,8 +24,8 @@ namespace pocketmine\network\protocol; #include -class TileEntityDataPacket extends DataPacket{ - const NETWORK_ID = Info::TILE_ENTITY_DATA_PACKET; +class BlockEntityDataPacket extends DataPacket{ + const NETWORK_ID = Info::BLOCK_ENTITY_DATA_PACKET; public $x; public $y; diff --git a/src/pocketmine/network/protocol/TileEventPacket.php b/src/pocketmine/network/protocol/BlockEventPacket.php similarity index 89% rename from src/pocketmine/network/protocol/TileEventPacket.php rename to src/pocketmine/network/protocol/BlockEventPacket.php index b46d2b5ec..1399cfc4d 100644 --- a/src/pocketmine/network/protocol/TileEventPacket.php +++ b/src/pocketmine/network/protocol/BlockEventPacket.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -24,8 +24,8 @@ namespace pocketmine\network\protocol; #include -class TileEventPacket extends DataPacket{ - const NETWORK_ID = Info::TILE_EVENT_PACKET; +class BlockEventPacket extends DataPacket{ + const NETWORK_ID = Info::BLOCK_EVENT_PACKET; public $x; public $y; @@ -46,4 +46,4 @@ class TileEventPacket extends DataPacket{ $this->putInt($this->case2); } -} \ No newline at end of file +} diff --git a/src/pocketmine/network/protocol/ContainerSetSlotPacket.php b/src/pocketmine/network/protocol/ContainerSetSlotPacket.php index 244aba979..43c4d1c34 100644 --- a/src/pocketmine/network/protocol/ContainerSetSlotPacket.php +++ b/src/pocketmine/network/protocol/ContainerSetSlotPacket.php @@ -30,12 +30,14 @@ class ContainerSetSlotPacket extends DataPacket{ public $windowid; public $slot; + public $hotbarSlot; /** @var Item */ public $item; public function decode(){ $this->windowid = $this->getByte(); $this->slot = $this->getShort(); + $this->hotboarSlot = $this->getShort(); $this->item = $this->getSlot(); } @@ -43,6 +45,7 @@ class ContainerSetSlotPacket extends DataPacket{ $this->reset(); $this->putByte($this->windowid); $this->putShort($this->slot); + $this->putShort($this->hotbarSlot); $this->putSlot($this->item); } diff --git a/src/pocketmine/network/protocol/Info.php b/src/pocketmine/network/protocol/Info.php index e22c2dc1d..c4113e93b 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 = 34; + const CURRENT_PROTOCOL = 38; const LOGIN_PACKET = 0x8f; const PLAY_STATUS_PACKET = 0x90; @@ -52,7 +52,7 @@ interface Info{ const ADD_PAINTING_PACKET = 0xa0; const EXPLODE_PACKET = 0xa1; const LEVEL_EVENT_PACKET = 0xa2; - const TILE_EVENT_PACKET = 0xa3; + const BLOCK_EVENT_PACKET = 0xa3; const ENTITY_EVENT_PACKET = 0xa4; const MOB_EFFECT_PACKET = 0xa5; const UPDATE_ATTRIBUTES_PACKET = 0xa6; @@ -78,7 +78,7 @@ interface Info{ const CRAFTING_DATA_PACKET = 0xba; const CRAFTING_EVENT_PACKET = 0xbb; const ADVENTURE_SETTINGS_PACKET = 0xbc; - const TILE_ENTITY_DATA_PACKET = 0xbd; + const BLOCK_ENTITY_DATA_PACKET = 0xbd; //const PLAYER_INPUT_PACKET = 0xbe; const FULL_CHUNK_DATA_PACKET = 0xbf; const SET_DIFFICULTY_PACKET = 0xc0; @@ -86,7 +86,7 @@ interface Info{ //const SET_PLAYER_GAMETYPE_PACKET = 0xc2; const PLAYER_LIST_PACKET = 0xc3; //const TELEMETRY_EVENT_PACKET = 0xc4; - + //const SPAWN_EXPERIENCE_ORB_PACKET = 0xc5 } diff --git a/src/pocketmine/network/protocol/LoginPacket.php b/src/pocketmine/network/protocol/LoginPacket.php index 3cc8eca94..5608ac993 100644 --- a/src/pocketmine/network/protocol/LoginPacket.php +++ b/src/pocketmine/network/protocol/LoginPacket.php @@ -52,6 +52,7 @@ class LoginPacket extends DataPacket{ $this->serverAddress = $this->getString(); $this->clientSecret = $this->getString(); + $this->getByte(); // TODO: skin transparency, experimental or not? $this->slim = $this->getByte() > 0; $this->skin = $this->getString(); } diff --git a/src/pocketmine/network/protocol/PlayerListPacket.php b/src/pocketmine/network/protocol/PlayerListPacket.php index bcb45acd6..9f9658b4a 100644 --- a/src/pocketmine/network/protocol/PlayerListPacket.php +++ b/src/pocketmine/network/protocol/PlayerListPacket.php @@ -53,6 +53,7 @@ class PlayerListPacket extends DataPacket{ $this->putUUID($d[0]); $this->putLong($d[1]); $this->putString($d[2]); + $this->putByte(0); // TODO: skin transparency, experimental or not? $this->putByte($d[3] ? 1 : 0); $this->putString($d[4]); }else{