mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Refactored entity IDs in packets for consistency and to clarify on types
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user