mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Refactored entity IDs in packets for consistency and to clarify on types
This commit is contained in:
@ -48,19 +48,19 @@ class EntityEventPacket extends DataPacket{
|
||||
|
||||
//TODO: add more events
|
||||
|
||||
public $eid;
|
||||
public $entityRuntimeId;
|
||||
public $event;
|
||||
public $data = 0;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->event = $this->getByte();
|
||||
$this->data = $this->getVarInt();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putEntityRuntimeId($this->eid);
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putByte($this->event);
|
||||
$this->putVarInt($this->data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user