mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Refactored entity IDs in packets for consistency and to clarify on types
This commit is contained in:
@ -29,19 +29,19 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
class SetEntityMotionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_ENTITY_MOTION_PACKET;
|
||||
|
||||
public $eid;
|
||||
public $entityRuntimeId;
|
||||
public $motionX;
|
||||
public $motionY;
|
||||
public $motionZ;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->getVector3f($this->motionX, $this->motionY, $this->motionZ);
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putEntityRuntimeId($this->eid);
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putVector3f($this->motionX, $this->motionY, $this->motionZ);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user