From 93896977d0ba5cf23748b8c4a7e108daa196ce8b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2017 10:18:58 +0000 Subject: [PATCH] Add default --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 30a9ae8059..dac5c89e59 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -430,7 +430,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade public function setViewDistance(int $distance){ $this->viewDistance = $this->server->getAllowedViewDistance($distance); - $this->spawnThreshold = (int) (min($this->viewDistance, $this->server->getProperty("chunk-sending.spawn-radius")) ** 2 * M_PI); + $this->spawnThreshold = (int) (min($this->viewDistance, $this->server->getProperty("chunk-sending.spawn-radius", 4)) ** 2 * M_PI); $pk = new ChunkRadiusUpdatedPacket(); $pk->radius = $this->viewDistance;