mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
Fixed #854 return not-safe spawn when safe spawn is not available
This commit is contained in:
parent
c52f6c9376
commit
101402fe56
@ -434,7 +434,10 @@ class Level{
|
||||
$z = (int) round($spawn->z);
|
||||
for(; $y > 0; --$y){
|
||||
$v = new Vector3($x, $y, $z);
|
||||
if(!($this->getBlock($v->getSide(0)) instanceof AirBlock)){
|
||||
$b = $this->getBlock($v->getSide(0));
|
||||
if($b === false){
|
||||
return $spawn;
|
||||
}elseif(!($b instanceof AirBlock)){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user