Level: fix chunk locks not getting released on generation errors

This commit is contained in:
Dylan K. Taylor
2018-06-06 11:42:29 +01:00
parent edd150971e
commit 7b17a83227
2 changed files with 16 additions and 11 deletions

View File

@ -152,11 +152,11 @@ class PopulationTask extends AsyncTask{
$c = $this->{"chunk$i"};
if($c !== null){
$c = Chunk::fastDeserialize($c);
$level->generateChunkCallback($c->getX(), $c->getZ(), $c);
$level->generateChunkCallback($c->getX(), $c->getZ(), $this->state ? $c : null);
}
}
$level->generateChunkCallback($chunk->getX(), $chunk->getZ(), $chunk);
$level->generateChunkCallback($chunk->getX(), $chunk->getZ(), $this->state ? $chunk : null);
}
}
}