Merge branch 'stable' into minor-next

This commit is contained in:
Dylan K. Taylor
2023-08-08 17:48:12 +01:00
13 changed files with 95 additions and 31 deletions

View File

@ -3003,7 +3003,7 @@ class World implements ChunkManager{
* @throws WorldException if the terrain is not generated
*/
public function getSafeSpawn(?Vector3 $spawn = null) : Position{
if(!($spawn instanceof Vector3) || $spawn->y < 1){
if(!($spawn instanceof Vector3) || $spawn->y <= $this->minY){
$spawn = $this->getSpawnLocation();
}