This commit is contained in:
GameHerobrine 2022-12-31 21:59:40 +03:00
parent 0f72601891
commit 2573e4f90d
14 changed files with 65 additions and 57 deletions

View file

@ -780,6 +780,15 @@ class Entity extends Position
if($this->class !== ENTITY_PLAYER && $update){
$this->updateMovement();
}
if($this->headYaw != $this->lastHeadYaw) {
$this->lastHeadYaw = $this->headYaw;
$pk = new RotateHeadPacket();
$pk->eid = $this->eid;
$pk->yaw = $this->headYaw;
$this->server->api->player->broadcastPacket($this->level->players, $pk);
}
$this->needsUpdate = $hasUpdate;
$this->lastUpdate = $now;
}