hopefully fixed entity movement

This commit is contained in:
GameHerobrine 2023-02-21 16:43:07 +03:00
parent 7b5d550fcb
commit 153894c368
2 changed files with 21 additions and 8 deletions

View file

@ -1273,13 +1273,8 @@ class Entity extends Position
$this->player->teleport(new Vector3($this->x, $this->y, $this->z));
return;
}
$pk = new MoveEntityPacket_PosRot();
$pk->eid = $this->eid;
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk = new MoveEntityPacket();
$pk->entities = [[$this->eid, $this->x, $this->y, $this->z, $this->yaw, $this->pitch]];
$this->server->api->player->broadcastPacket($this->level->players, $pk);
}