Higher chunk defaults

This commit is contained in:
Shoghi Cervantes 2014-12-28 02:58:17 +01:00
parent 8d9fbec4ce
commit d800a21bd4
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89
4 changed files with 29 additions and 34 deletions

View File

@ -300,7 +300,7 @@ class Server{
* @return int * @return int
*/ */
public function getViewDistance(){ public function getViewDistance(){
return max(56, $this->getProperty("chunk-sending.max-chunks", 96)); return max(56, $this->getProperty("chunk-sending.max-chunks", 256));
} }
/** /**

View File

@ -294,8 +294,8 @@ class Level implements ChunkManager, Metadatable{
$this->updateQueue->setExtractFlags(\SplPriorityQueue::EXTR_BOTH); $this->updateQueue->setExtractFlags(\SplPriorityQueue::EXTR_BOTH);
$this->time = (int) $this->provider->getTime(); $this->time = (int) $this->provider->getTime();
$this->chunkTickRadius = min($this->server->getViewDistance(), max(1, (int) $this->server->getProperty("chunk-ticking.tick-radius", 3))); $this->chunkTickRadius = min($this->server->getViewDistance(), max(1, (int) $this->server->getProperty("chunk-ticking.tick-radius", 4)));
$this->chunksPerTick = (int) $this->server->getProperty("chunk-ticking.per-tick", 80); $this->chunksPerTick = (int) $this->server->getProperty("chunk-ticking.per-tick", 260);
$this->chunkTickList = []; $this->chunkTickList = [];
$this->clearChunksOnTick = (bool) $this->server->getProperty("chunk-ticking.clear-tick-list", false); $this->clearChunksOnTick = (bool) $this->server->getProperty("chunk-ticking.clear-tick-list", false);

View File

@ -114,16 +114,13 @@ class Normal extends Generator{
$chunk = $this->level->getChunk($chunkX, $chunkZ); $chunk = $this->level->getChunk($chunkX, $chunkZ);
for($chunkY = 0; $chunkY < 8; ++$chunkY){
$startY = $chunkY << 4;
$endY = $startY + 16;
for($z = 0; $z < 16; ++$z){ for($z = 0; $z < 16; ++$z){
for($x = 0; $x < 16; ++$x){ for($x = 0; $x < 16; ++$x){
$i = ($z << 4) + $x; $i = ($z << 4) + $x;
$height = $this->worldHeight + $hills[$i] * 14 + $base[$i] * 7; $height = $this->worldHeight + $hills[$i] * 14 + $base[$i] * 7;
$height = (int) $height; $height = (int) $height;
for($y = $startY; $y < $endY; ++$y){ for($y = 0; $y < 128; ++$y){
$diff = $height - $y; $diff = $height - $y;
if($y <= 4 and ($y === 0 or $this->random->nextFloat() < 0.75)){ if($y <= 4 and ($y === 0 or $this->random->nextFloat() < 0.75)){
$chunk->setBlockId($x, $y, $z, Block::BEDROCK); $chunk->setBlockId($x, $y, $z, Block::BEDROCK);
@ -146,7 +143,6 @@ class Normal extends Generator{
} }
} }
}
} }

View File

@ -34,15 +34,14 @@ chunk-sending:
per-tick: 4 per-tick: 4
#Compression level used when sending chunks. Higher = more CPU, less bandwidth usage #Compression level used when sending chunks. Higher = more CPU, less bandwidth usage
compression-level: 8 compression-level: 8
#Amount of chunks loaded around a player by the server, min. 56 as MC: PE 0.9.5 #Amount of chunks sent around each player
#Increasing this more than 96 (as of MC: PE 0.9.5) can cause issues with the client ignoring chunks max-chunks: 256
max-chunks: 96
chunk-ticking: chunk-ticking:
#Max amount of chunks processed each tick #Max amount of chunks processed each tick
per-tick: 80 per-tick: 260
#Radius of chunks around a player to tick #Radius of chunks around a player to tick
tick-radius: 2 tick-radius: 4
light-updates: false light-updates: false
clear-tick-list: false clear-tick-list: false