Fix AddPlayerPacket field ordering

This commit is contained in:
Dylan K. Taylor 2016-11-02 09:38:31 +00:00
parent f50c63a0c2
commit b34d438ed9

View File

@ -41,6 +41,7 @@ class AddPlayerPacket extends DataPacket{
public $speedY;
public $speedZ;
public $pitch;
public $headYaw;
public $yaw;
public $item;
public $metadata = [];
@ -57,12 +58,10 @@ class AddPlayerPacket extends DataPacket{
$this->putEntityId($this->eid); //EntityRuntimeID
$this->putVector3f($this->x, $this->y, $this->z);
$this->putVector3f($this->speedX, $this->speedY, $this->speedZ);
//TODO: check these are in the right order
$this->putLFloat($this->yaw);
$this->putLFloat($this->yaw); //TODO headrot
$this->putLFloat($this->pitch);
$this->putLFloat($this->headYaw ?? $this->yaw);
$this->putLFloat($this->yaw);
$this->putSlot($this->item);
$meta = Binary::writeMetadata($this->metadata);
$this->put($meta);
}