mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Changed default view-distance
This commit is contained in:
parent
6f9becdbb3
commit
496c004efc
@ -269,7 +269,7 @@ class Server{
|
|||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getViewDistance(){
|
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);
|
$x = mt_rand(0, 15);
|
||||||
$y = mt_rand(0, 15);
|
$y = mt_rand(0, 15);
|
||||||
$z = mt_rand(0, 15);
|
$z = mt_rand(0, 15);
|
||||||
if($section->getBlockId($x, $y, $z) !== 0){
|
if(($blockId = $section->getBlockId($x, $y, $z)) !== 0){
|
||||||
$this->getBlock(new Vector3($X * 16 + $x, $Y * 16 + $y, $Z * 16 + $z))->onUpdate(self::BLOCK_UPDATE_RANDOM);
|
$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