Merge changes from master

This commit is contained in:
Dylan K. Taylor
2017-05-24 09:54:11 +01:00
10 changed files with 67 additions and 38 deletions

View File

@ -50,9 +50,12 @@ class LoginPacket extends DataPacket{
public function decode(){
$this->protocol = $this->getInt();
}
public function decodeAdditional(){
if($this->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
$this->buffer = null;
return; //Do not attempt to decode for non-accepted protocols
}
$this->gameEdition = $this->getByte();
$this->setBuffer($this->getString(), 0);

View File

@ -16,23 +16,35 @@
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
* This file is generated automatically, do not edit it manually.
*
*/
/**
* Minecraft: PE multiplayer protocol implementation
*/
namespace pocketmine\network\mcpe\protocol;
/**
* Version numbers and packet IDs for the current Minecraft PE protocol
*/
interface ProtocolInfo{
/**
* NOTE TO DEVELOPERS
* Do not waste your time or ours submitting pull requests changing game and/or protocol version numbers.
* Pull requests changing game and/or protocol version numbers will be closed.
*
* This file is generated automatically, do not edit it manually.
*/
/**
* Actual Minecraft: PE protocol version
*/
const CURRENT_PROTOCOL = 112;
/**
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
*/
const MINECRAFT_VERSION = 'v1.1.0.9 beta';
/**
* Version number sent to clients in ping responses.
*/
const MINECRAFT_VERSION_NETWORK = '1.1.0.9';
const LOGIN_PACKET = 0x01;