Added encode and decode methods for more packets

This commit is contained in:
Dylan K. Taylor
2017-05-15 15:56:59 +01:00
parent 162a08b8cb
commit 0a4d62b405
57 changed files with 244 additions and 78 deletions

View File

@ -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{