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

@ -49,7 +49,7 @@ class PlayerActionPacket extends DataPacket{
const ACTION_CONTINUE_BREAK = 18;
public $eid;
public $entityRuntimeId;
public $action;
public $x;
public $y;
@ -57,7 +57,7 @@ class PlayerActionPacket extends DataPacket{
public $face;
public function decode(){
$this->eid = $this->getEntityRuntimeId();
$this->entityRuntimeId = $this->getEntityRuntimeId();
$this->action = $this->getVarInt();
$this->getBlockPosition($this->x, $this->y, $this->z);
$this->face = $this->getVarInt();
@ -65,7 +65,7 @@ class PlayerActionPacket extends DataPacket{
public function encode(){
$this->reset();
$this->putEntityRuntimeId($this->eid);
$this->putEntityRuntimeId($this->entityRuntimeId);
$this->putVarInt($this->action);
$this->putBlockPosition($this->x, $this->y, $this->z);
$this->putVarInt($this->face);