Chunk cache is now non-optional, close #1448

This commit is contained in:
Dylan K. Taylor 2017-10-04 13:50:32 +01:00
parent bf68a6a9fc
commit a8c6e14d02
2 changed files with 1 additions and 7 deletions

View File

@ -137,8 +137,6 @@ class Level implements ChunkManager, Metadatable{
/** @var BatchPacket[] */
private $chunkCache = [];
private $cacheChunks = false;
private $sendTimeTicker = 0;
/** @var Server */
@ -337,7 +335,6 @@ class Level implements ChunkManager, Metadatable{
$this->chunkGenerationQueueSize = (int) $this->server->getProperty("chunk-generation.queue-size", 8);
$this->chunkPopulationQueueSize = (int) $this->server->getProperty("chunk-generation.population-queue-size", 2);
$this->clearChunksOnTick = (bool) $this->server->getProperty("chunk-ticking.clear-tick-list", true);
$this->cacheChunks = (bool) $this->server->getProperty("chunk-sending.cache-chunks", true);
$dontTickBlocks = $this->server->getProperty("chunk-ticking.disable-block-ticking", []);
$this->randomTickBlocks = new \SplFixedArray(256);
@ -2408,7 +2405,7 @@ class Level implements ChunkManager, Metadatable{
$index = Level::chunkHash($x, $z);
if(!isset($this->chunkCache[$index]) and $this->cacheChunks and $this->server->getMemoryManager()->canUseChunkCache()){
if(!isset($this->chunkCache[$index]) and $this->server->getMemoryManager()->canUseChunkCache()){
$this->chunkCache[$index] = $payload;
$this->sendChunkFromCache($x, $z);
$this->timings->syncChunkSendTimer->stopTiming();

View File

@ -130,9 +130,6 @@ chunk-sending:
per-tick: 4
#Radius of chunks that need to be sent before spawning the player
spawn-radius: 4
#Save a serialized copy of the chunk in memory for faster sending
#Useful in mostly-static worlds where lots of players join at the same time
cache-chunks: true
chunk-ticking:
#Max amount of chunks processed each tick