From 101402fe56a878f377224ea391362e4326df7460 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 27 Jan 2014 18:16:28 +0100 Subject: [PATCH] Fixed #854 return not-safe spawn when safe spawn is not available --- src/world/Level.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/world/Level.php b/src/world/Level.php index 99e1075b9..5812c0f2c 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -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; } }