aaa i hate sql(mobs will cause less lags)

This commit is contained in:
GameHerobrine 2022-11-02 20:21:44 +03:00
parent f40fe179c1
commit 51442ed771
5 changed files with 1411 additions and 1210 deletions

View file

@ -1467,7 +1467,8 @@ class Player{
break;
}
$pos = new Position($this->entity->x, $this->entity->y, $this->entity->z, $this->level);
$this->teleport($pos, $this->data->get("position")["yaw"], $this->data->get("position")["pitch"], true, true);
$pData = $this->data->get("position");
$this->teleport($pos, isset($pData["yaw"]) ? $pData["yaw"] : false, isset($pData["pitch"]) ? $pData["pitch"] : false, true, true);
$this->entity->setHealth($this->data->get("health"), "spawn", true);
$this->spawned = true;
$this->server->api->player->spawnAllPlayers($this);