From 94f4ef5862de594daa21bf3cf51bdd7e48c25e01 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 25 Oct 2021 21:07:03 +0100 Subject: [PATCH] PopulationTask: Throw AssumptionFailedError if center chunk is null for some reason --- src/world/generator/PopulationTask.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/world/generator/PopulationTask.php b/src/world/generator/PopulationTask.php index 2f601a80d..2cd68ebde 100644 --- a/src/world/generator/PopulationTask.php +++ b/src/world/generator/PopulationTask.php @@ -149,7 +149,9 @@ class PopulationTask extends AsyncTask{ /** @var World $world */ $world = $this->fetchLocal(self::TLS_KEY_WORLD); if($world->isLoaded()){ - $chunk = $this->chunk !== null ? FastChunkSerializer::deserializeTerrain($this->chunk) : null; + $chunk = $this->chunk !== null ? + FastChunkSerializer::deserializeTerrain($this->chunk) : + throw new AssumptionFailedError("Center chunk should never be null"); for($i = 0; $i < 9; ++$i){ if($i === 4){