From ec2feeffcbcd38d71ca15c6130333348158c45ec Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 3 Dec 2020 18:23:03 +0000 Subject: [PATCH] World->populateChunk() no longer causes ChunkLoadEvent to fire with an empty chunk instead, it will fire when the chunk comes out of PopulationTask and is set into the world using setChunk(). There is still one place left where auto-creation of empty chunks is used by the core, and that's an issue i'm still deciding how to deal with. --- src/world/World.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/world/World.php b/src/world/World.php index e0bb91982..c14d6da09 100644 --- a/src/world/World.php +++ b/src/world/World.php @@ -2513,7 +2513,10 @@ class World implements ChunkManager{ } } - $chunk = $this->loadChunk($x, $z, true); + $chunk = $this->loadChunk($x, $z, false); + if($chunk === null){ + $chunk = new Chunk($x, $z); + } if(!$chunk->isPopulated()){ Timings::$populationTimer->startTiming();