mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 06:25:32 +00:00
Protocol changes for 1.5.0.0
this feels so strange to type... can we ditch the versioning system already?
This commit is contained in:
parent
68494f1c0d
commit
eb28622823
@ -40,6 +40,8 @@ class PlayerSkinPacket extends DataPacket{
|
|||||||
public $newSkinName = "";
|
public $newSkinName = "";
|
||||||
/** @var Skin */
|
/** @var Skin */
|
||||||
public $skin;
|
public $skin;
|
||||||
|
/** @var bool */
|
||||||
|
public $premium = false;
|
||||||
|
|
||||||
|
|
||||||
protected function decodePayload(){
|
protected function decodePayload(){
|
||||||
@ -52,6 +54,7 @@ class PlayerSkinPacket extends DataPacket{
|
|||||||
$capeData = $this->getString();
|
$capeData = $this->getString();
|
||||||
$geometryModel = $this->getString();
|
$geometryModel = $this->getString();
|
||||||
$geometryData = $this->getString();
|
$geometryData = $this->getString();
|
||||||
|
$this->premium = $this->getBool();
|
||||||
|
|
||||||
$this->skin = new Skin($skinId, $skinData, $capeData, $geometryModel, $geometryData);
|
$this->skin = new Skin($skinId, $skinData, $capeData, $geometryModel, $geometryData);
|
||||||
}
|
}
|
||||||
@ -66,6 +69,7 @@ class PlayerSkinPacket extends DataPacket{
|
|||||||
$this->putString($this->skin->getCapeData());
|
$this->putString($this->skin->getCapeData());
|
||||||
$this->putString($this->skin->getGeometryName());
|
$this->putString($this->skin->getGeometryName());
|
||||||
$this->putString($this->skin->getGeometryData());
|
$this->putString($this->skin->getGeometryData());
|
||||||
|
$this->putBool($this->premium);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $session) : bool{
|
public function handle(NetworkSession $session) : bool{
|
||||||
|
@ -39,15 +39,15 @@ interface ProtocolInfo{
|
|||||||
/**
|
/**
|
||||||
* Actual Minecraft: PE protocol version
|
* Actual Minecraft: PE protocol version
|
||||||
*/
|
*/
|
||||||
public const CURRENT_PROTOCOL = 260;
|
public const CURRENT_PROTOCOL = 270;
|
||||||
/**
|
/**
|
||||||
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
|
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
|
||||||
*/
|
*/
|
||||||
public const MINECRAFT_VERSION = 'v1.2.20.1 beta';
|
public const MINECRAFT_VERSION = 'v1.5.0.0 beta';
|
||||||
/**
|
/**
|
||||||
* Version number sent to clients in ping responses.
|
* Version number sent to clients in ping responses.
|
||||||
*/
|
*/
|
||||||
public const MINECRAFT_VERSION_NETWORK = '1.2.20.1';
|
public const MINECRAFT_VERSION_NETWORK = '1.5.0.0';
|
||||||
|
|
||||||
public const LOGIN_PACKET = 0x01;
|
public const LOGIN_PACKET = 0x01;
|
||||||
public const PLAY_STATUS_PACKET = 0x02;
|
public const PLAY_STATUS_PACKET = 0x02;
|
||||||
|
@ -70,6 +70,8 @@ class StartGamePacket extends DataPacket{
|
|||||||
public $time = -1;
|
public $time = -1;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $eduMode = false;
|
public $eduMode = false;
|
||||||
|
/** @var bool */
|
||||||
|
public $hasEduFeaturesEnabled = false;
|
||||||
/** @var float */
|
/** @var float */
|
||||||
public $rainLevel;
|
public $rainLevel;
|
||||||
/** @var float */
|
/** @var float */
|
||||||
@ -104,6 +106,12 @@ class StartGamePacket extends DataPacket{
|
|||||||
public $platformBroadcastMode = 0;
|
public $platformBroadcastMode = 0;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $xboxLiveBroadcastIntent = false;
|
public $xboxLiveBroadcastIntent = false;
|
||||||
|
/** @var bool */
|
||||||
|
public $hasLockedBehaviorPack = false;
|
||||||
|
/** @var bool */
|
||||||
|
public $hasLockedResourcePack = false;
|
||||||
|
/** @var bool */
|
||||||
|
public $isFromLockedWorldTemplate = false;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $levelId = ""; //base64 string, usually the same as world folder name in vanilla
|
public $levelId = ""; //base64 string, usually the same as world folder name in vanilla
|
||||||
@ -138,6 +146,7 @@ class StartGamePacket extends DataPacket{
|
|||||||
$this->hasAchievementsDisabled = $this->getBool();
|
$this->hasAchievementsDisabled = $this->getBool();
|
||||||
$this->time = $this->getVarInt();
|
$this->time = $this->getVarInt();
|
||||||
$this->eduMode = $this->getBool();
|
$this->eduMode = $this->getBool();
|
||||||
|
$this->hasEduFeaturesEnabled = $this->getBool();
|
||||||
$this->rainLevel = $this->getLFloat();
|
$this->rainLevel = $this->getLFloat();
|
||||||
$this->lightningLevel = $this->getLFloat();
|
$this->lightningLevel = $this->getLFloat();
|
||||||
$this->isMultiplayerGame = $this->getBool();
|
$this->isMultiplayerGame = $this->getBool();
|
||||||
@ -155,6 +164,9 @@ class StartGamePacket extends DataPacket{
|
|||||||
$this->hasPlatformBroadcast = $this->getBool();
|
$this->hasPlatformBroadcast = $this->getBool();
|
||||||
$this->platformBroadcastMode = $this->getVarInt();
|
$this->platformBroadcastMode = $this->getVarInt();
|
||||||
$this->xboxLiveBroadcastIntent = $this->getBool();
|
$this->xboxLiveBroadcastIntent = $this->getBool();
|
||||||
|
$this->hasLockedBehaviorPack = $this->getBool();
|
||||||
|
$this->hasLockedResourcePack = $this->getBool();
|
||||||
|
$this->isFromLockedWorldTemplate = $this->getBool();
|
||||||
|
|
||||||
$this->levelId = $this->getString();
|
$this->levelId = $this->getString();
|
||||||
$this->worldName = $this->getString();
|
$this->worldName = $this->getString();
|
||||||
@ -185,6 +197,7 @@ class StartGamePacket extends DataPacket{
|
|||||||
$this->putBool($this->hasAchievementsDisabled);
|
$this->putBool($this->hasAchievementsDisabled);
|
||||||
$this->putVarInt($this->time);
|
$this->putVarInt($this->time);
|
||||||
$this->putBool($this->eduMode);
|
$this->putBool($this->eduMode);
|
||||||
|
$this->putBool($this->hasEduFeaturesEnabled);
|
||||||
$this->putLFloat($this->rainLevel);
|
$this->putLFloat($this->rainLevel);
|
||||||
$this->putLFloat($this->lightningLevel);
|
$this->putLFloat($this->lightningLevel);
|
||||||
$this->putBool($this->isMultiplayerGame);
|
$this->putBool($this->isMultiplayerGame);
|
||||||
@ -202,6 +215,9 @@ class StartGamePacket extends DataPacket{
|
|||||||
$this->putBool($this->hasPlatformBroadcast);
|
$this->putBool($this->hasPlatformBroadcast);
|
||||||
$this->putVarInt($this->platformBroadcastMode);
|
$this->putVarInt($this->platformBroadcastMode);
|
||||||
$this->putBool($this->xboxLiveBroadcastIntent);
|
$this->putBool($this->xboxLiveBroadcastIntent);
|
||||||
|
$this->putBool($this->hasLockedBehaviorPack);
|
||||||
|
$this->putBool($this->hasLockedResourcePack);
|
||||||
|
$this->putBool($this->isFromLockedWorldTemplate);
|
||||||
|
|
||||||
$this->putString($this->levelId);
|
$this->putString($this->levelId);
|
||||||
$this->putString($this->worldName);
|
$this->putString($this->worldName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user