Refactored entity IDs in packets for consistency and to clarify on types

This commit is contained in:
Dylan K. Taylor
2017-06-05 15:41:27 +01:00
parent 51d510aa4f
commit 54453d0b0a
21 changed files with 58 additions and 58 deletions

View File

@ -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);