mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 23:15:29 +00:00
Updated for 1.2.0.18
This commit is contained in:
parent
09c53552c1
commit
8853452feb
@ -101,6 +101,7 @@ use pocketmine\network\mcpe\protocol\ServerSettingsRequestPacket;
|
||||
use pocketmine\network\mcpe\protocol\ServerSettingsResponsePacket;
|
||||
use pocketmine\network\mcpe\protocol\ServerToClientHandshakePacket;
|
||||
use pocketmine\network\mcpe\protocol\SetCommandsEnabledPacket;
|
||||
use pocketmine\network\mcpe\protocol\SetDefaultGameTypePacket;
|
||||
use pocketmine\network\mcpe\protocol\SetDifficultyPacket;
|
||||
use pocketmine\network\mcpe\protocol\SetEntityDataPacket;
|
||||
use pocketmine\network\mcpe\protocol\SetEntityLinkPacket;
|
||||
@ -549,4 +550,8 @@ abstract class NetworkSession{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function handleSetDefaultGameType(SetDefaultGameTypePacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -61,6 +61,7 @@ class AddPlayerPacket extends DataPacket{
|
||||
public $uvarint2 = 0;
|
||||
public $uvarint3 = 0;
|
||||
public $uvarint4 = 0;
|
||||
public $uvarint5 = 0;
|
||||
|
||||
public $long1 = 0;
|
||||
|
||||
@ -83,6 +84,7 @@ class AddPlayerPacket extends DataPacket{
|
||||
$this->uvarint2 = $this->getUnsignedVarInt();
|
||||
$this->uvarint3 = $this->getUnsignedVarInt();
|
||||
$this->uvarint4 = $this->getUnsignedVarInt();
|
||||
$this->uvarint5 = $this->getUnsignedVarInt();
|
||||
|
||||
$this->long1 = $this->getLLong();
|
||||
|
||||
@ -109,6 +111,7 @@ class AddPlayerPacket extends DataPacket{
|
||||
$this->putUnsignedVarInt($this->uvarint2);
|
||||
$this->putUnsignedVarInt($this->uvarint3);
|
||||
$this->putUnsignedVarInt($this->uvarint4);
|
||||
$this->putUnsignedVarInt($this->uvarint5);
|
||||
|
||||
$this->putLLong($this->long1);
|
||||
|
||||
|
@ -74,6 +74,8 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $playerPermission = PlayerPermissions::MEMBER;
|
||||
/** @var int */
|
||||
public $customFlags = 0; //...
|
||||
/** @var int */
|
||||
public $entityUniqueId; //This is a little-endian long, NOT a var-long. (WTF Mojang)
|
||||
|
||||
protected function decodePayload(){
|
||||
@ -81,6 +83,7 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
$this->commandPermission = $this->getUnsignedVarInt();
|
||||
$this->flags2 = $this->getUnsignedVarInt();
|
||||
$this->playerPermission = $this->getUnsignedVarInt();
|
||||
$this->customFlags = $this->getUnsignedVarInt();
|
||||
$this->entityUniqueId = $this->getLLong();
|
||||
}
|
||||
|
||||
@ -89,6 +92,7 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
$this->putUnsignedVarInt($this->commandPermission);
|
||||
$this->putUnsignedVarInt($this->flags2);
|
||||
$this->putUnsignedVarInt($this->playerPermission);
|
||||
$this->putUnsignedVarInt($this->customFlags);
|
||||
$this->putLLong($this->entityUniqueId);
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,7 @@ class PacketPool{
|
||||
static::registerPacket(new ServerSettingsRequestPacket());
|
||||
static::registerPacket(new ServerSettingsResponsePacket());
|
||||
static::registerPacket(new ShowProfilePacket());
|
||||
static::registerPacket(new SetDefaultGameTypePacket());
|
||||
|
||||
static::registerPacket(new BatchPacket());
|
||||
}
|
||||
|
@ -39,15 +39,15 @@ interface ProtocolInfo{
|
||||
/**
|
||||
* Actual Minecraft: PE protocol version
|
||||
*/
|
||||
const CURRENT_PROTOCOL = 132;
|
||||
const CURRENT_PROTOCOL = 133;
|
||||
/**
|
||||
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
|
||||
*/
|
||||
const MINECRAFT_VERSION = 'v1.2.0.11 beta';
|
||||
const MINECRAFT_VERSION = 'v1.2.0.18 beta';
|
||||
/**
|
||||
* Version number sent to clients in ping responses.
|
||||
*/
|
||||
const MINECRAFT_VERSION_NETWORK = '1.2.0.11';
|
||||
const MINECRAFT_VERSION_NETWORK = '1.2.0.18';
|
||||
|
||||
const LOGIN_PACKET = 0x01;
|
||||
const PLAY_STATUS_PACKET = 0x02;
|
||||
@ -153,5 +153,6 @@ interface ProtocolInfo{
|
||||
const SERVER_SETTINGS_REQUEST_PACKET = 0x66;
|
||||
const SERVER_SETTINGS_RESPONSE_PACKET = 0x67;
|
||||
const SHOW_PROFILE_PACKET = 0x68;
|
||||
const SET_DEFAULT_GAME_TYPE_PACKET = 0x69;
|
||||
|
||||
}
|
||||
|
@ -35,10 +35,11 @@ class TextPacket extends DataPacket{
|
||||
const TYPE_CHAT = 1;
|
||||
const TYPE_TRANSLATION = 2;
|
||||
const TYPE_POPUP = 3;
|
||||
const TYPE_TIP = 4;
|
||||
const TYPE_SYSTEM = 5;
|
||||
const TYPE_WHISPER = 6;
|
||||
const TYPE_ANNOUNCEMENT = 7;
|
||||
const TYPE_JUKEBOX_POPUP = 4;
|
||||
const TYPE_TIP = 5;
|
||||
const TYPE_SYSTEM = 6;
|
||||
const TYPE_WHISPER = 7;
|
||||
const TYPE_ANNOUNCEMENT = 8;
|
||||
|
||||
/** @var int */
|
||||
public $type;
|
||||
@ -67,6 +68,7 @@ class TextPacket extends DataPacket{
|
||||
$this->message = $this->getString();
|
||||
break;
|
||||
|
||||
case self::TYPE_JUKEBOX_POPUP:
|
||||
case self::TYPE_TRANSLATION:
|
||||
$this->message = $this->getString();
|
||||
$count = $this->getUnsignedVarInt();
|
||||
@ -92,6 +94,7 @@ class TextPacket extends DataPacket{
|
||||
$this->putString($this->message);
|
||||
break;
|
||||
|
||||
case self::TYPE_JUKEBOX_POPUP:
|
||||
case self::TYPE_TRANSLATION:
|
||||
$this->putString($this->message);
|
||||
$this->putUnsignedVarInt(count($this->parameters));
|
||||
|
Loading…
x
Reference in New Issue
Block a user