mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 15:05:33 +00:00
Add default
This commit is contained in:
parent
554816b8b6
commit
93896977d0
@ -430,7 +430,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
public function setViewDistance(int $distance){
|
public function setViewDistance(int $distance){
|
||||||
$this->viewDistance = $this->server->getAllowedViewDistance($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 = new ChunkRadiusUpdatedPacket();
|
||||||
$pk->radius = $this->viewDistance;
|
$pk->radius = $this->viewDistance;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user