mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Refactored entity IDs in packets for consistency and to clarify on types
This commit is contained in:
@ -34,7 +34,7 @@ class MovePlayerPacket extends DataPacket{
|
||||
const MODE_TELEPORT = 2;
|
||||
const MODE_PITCH = 3; //facepalm Mojang
|
||||
|
||||
public $eid;
|
||||
public $entityRuntimeId;
|
||||
public $x;
|
||||
public $y;
|
||||
public $z;
|
||||
@ -48,7 +48,7 @@ class MovePlayerPacket extends DataPacket{
|
||||
public $int2 = 0;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->getVector3f($this->x, $this->y, $this->z);
|
||||
$this->pitch = $this->getLFloat();
|
||||
$this->yaw = $this->getLFloat();
|
||||
@ -64,7 +64,7 @@ class MovePlayerPacket extends DataPacket{
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putEntityRuntimeId($this->eid);
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putVector3f($this->x, $this->y, $this->z);
|
||||
$this->putLFloat($this->pitch);
|
||||
$this->putLFloat($this->yaw);
|
||||
|
Reference in New Issue
Block a user