From a8c6e14d0268e777c7053a909e5ca472b50207f7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 4 Oct 2017 13:50:32 +0100 Subject: [PATCH] Chunk cache is now non-optional, close #1448 --- src/pocketmine/level/Level.php | 5 +---- src/pocketmine/resources/pocketmine.yml | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 566d376ff..b0eec34fe 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -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(); diff --git a/src/pocketmine/resources/pocketmine.yml b/src/pocketmine/resources/pocketmine.yml index 14f285c0b..522ef6927 100644 --- a/src/pocketmine/resources/pocketmine.yml +++ b/src/pocketmine/resources/pocketmine.yml @@ -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