player doesnt fall when he is on the world border, player is not spawning on world border if he logged in nearby it

This commit is contained in:
GameHerobrine 2022-08-05 12:47:19 +03:00
parent 431063ad83
commit 4ffa7f46a4
2 changed files with 4 additions and 2 deletions

View file

@ -419,6 +419,9 @@ class Level{
$x = (int) round($spawn->x);
$y = (int) round($spawn->y);
$z = (int) round($spawn->z);
if($x < 0 || $x > 255 || $z < 0 || $z > 255){
return new Position($x, 128, $z, $this);
}
for(; $y > 0; --$y){
$v = new Vector3($x, $y, $z);
$b = $this->getBlock($v->getSide(0));