mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
Protocol updates for 1.1.0.9
This commit is contained in:
parent
bf9b8722c9
commit
dc71eb5246
@ -31,7 +31,8 @@ class MovePlayerPacket extends DataPacket{
|
||||
|
||||
const MODE_NORMAL = 0;
|
||||
const MODE_RESET = 1;
|
||||
const MODE_ROTATION = 2;
|
||||
const MODE_TELEPORT = 2;
|
||||
const MODE_PITCH = 3; //facepalm Mojang
|
||||
|
||||
public $eid;
|
||||
public $x;
|
||||
@ -43,6 +44,8 @@ class MovePlayerPacket extends DataPacket{
|
||||
public $mode = self::MODE_NORMAL;
|
||||
public $onGround;
|
||||
public $ridingEid;
|
||||
public $int1 = 0;
|
||||
public $int2 = 0;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
@ -53,6 +56,10 @@ class MovePlayerPacket extends DataPacket{
|
||||
$this->mode = $this->getByte();
|
||||
$this->onGround = $this->getBool();
|
||||
$this->ridingEid = $this->getEntityRuntimeId();
|
||||
if($this->mode === MovePlayerPacket::MODE_TELEPORT){
|
||||
$this->int1 = $this->getLInt();
|
||||
$this->int2 = $this->getLInt();
|
||||
}
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
@ -65,6 +72,10 @@ class MovePlayerPacket extends DataPacket{
|
||||
$this->putByte($this->mode);
|
||||
$this->putBool($this->onGround);
|
||||
$this->putEntityRuntimeId($this->ridingEid);
|
||||
if($this->mode === MovePlayerPacket::MODE_TELEPORT){
|
||||
$this->putLInt($this->int1);
|
||||
$this->putLInt($this->int2);
|
||||
}
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
@ -31,9 +31,9 @@ interface ProtocolInfo{
|
||||
/**
|
||||
* Actual Minecraft: PE protocol version
|
||||
*/
|
||||
const CURRENT_PROTOCOL = 111;
|
||||
const MINECRAFT_VERSION = 'v1.1.0.8 beta';
|
||||
const MINECRAFT_VERSION_NETWORK = '1.1.0.8';
|
||||
const CURRENT_PROTOCOL = 112;
|
||||
const MINECRAFT_VERSION = 'v1.1.0.9 beta';
|
||||
const MINECRAFT_VERSION_NETWORK = '1.1.0.9';
|
||||
|
||||
const LOGIN_PACKET = 0x01;
|
||||
const PLAY_STATUS_PACKET = 0x02;
|
||||
|
Loading…
x
Reference in New Issue
Block a user