players should not fall through ground now

This commit is contained in:
GameHerobrine 2023-02-22 20:07:12 +03:00
parent 87ed00d718
commit 1b0366802f
2 changed files with 7 additions and 24 deletions

View file

@ -754,7 +754,7 @@ class Entity extends Position
$pk = new MovePlayerPacket();
$pk->eid = $this->eid;
$pk->x = $this->x;
$pk->y = $this->y;
$pk->y = $this->y + $this->getEyeHeight();
$pk->z = $this->z;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
@ -762,13 +762,8 @@ class Entity extends Position
$this->server->api->player->broadcastPacket($players, $pk);
} else{
$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($players, $pk);
}
}