Fixed #854 return not-safe spawn when safe spawn is not available

This commit is contained in:
Shoghi Cervantes 2014-01-27 18:16:28 +01:00
parent c52f6c9376
commit 101402fe56

View File

@ -434,7 +434,10 @@ class Level{
$z = (int) round($spawn->z); $z = (int) round($spawn->z);
for(; $y > 0; --$y){ for(; $y > 0; --$y){
$v = new Vector3($x, $y, $z); $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; break;
} }
} }