PopulationTask: Throw AssumptionFailedError if center chunk is null for some reason

This commit is contained in:
Dylan K. Taylor 2021-10-25 21:07:03 +01:00
parent 2e2515354c
commit 94f4ef5862
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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){