mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Changed default view-distance
This commit is contained in:
parent
6f9becdbb3
commit
496c004efc
@ -269,7 +269,7 @@ class Server{
|
||||
* @return int
|
||||
*/
|
||||
public function getViewDistance(){
|
||||
return $this->getConfigInt("view-distance", 8);
|
||||
return min(11, max($this->getConfigInt("view-distance", 7), 4));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -401,8 +401,9 @@ class Level implements ChunkManager, Metadatable{
|
||||
$x = mt_rand(0, 15);
|
||||
$y = mt_rand(0, 15);
|
||||
$z = mt_rand(0, 15);
|
||||
if($section->getBlockId($x, $y, $z) !== 0){
|
||||
$this->getBlock(new Vector3($X * 16 + $x, $Y * 16 + $y, $Z * 16 + $z))->onUpdate(self::BLOCK_UPDATE_RANDOM);
|
||||
if(($blockId = $section->getBlockId($x, $y, $z)) !== 0){
|
||||
$block = Block::get($blockId, $section->getBlockData($x, $y, $z), new Position($X * 16 + $x, $Y * 16 + $y, $Z * 16 + $z, $this));
|
||||
$block->onUpdate(self::BLOCK_UPDATE_RANDOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user