mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added encode and decode methods for more packets
This commit is contained in:
@ -34,16 +34,12 @@ class RespawnPacket extends DataPacket{
|
||||
public $z;
|
||||
|
||||
public function decode(){
|
||||
$this->x = $this->getLFloat();
|
||||
$this->y = $this->getLFloat();
|
||||
$this->z = $this->getLFloat();
|
||||
$this->getVector3f($this->x, $this->y, $this->z);
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putLFloat($this->x);
|
||||
$this->putLFloat($this->y);
|
||||
$this->putLFloat($this->z);
|
||||
$this->putVector3f($this->x, $this->y, $this->z);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user