Level: remove useless check from populateChunk()

this is already checked at the top of the function.
This commit is contained in:
Dylan K. Taylor 2018-07-16 17:36:36 +01:00
parent 710e1d014d
commit 921f7e8f6a

View File

@ -2947,16 +2947,14 @@ class Level implements ChunkManager, Metadatable{
}
if($populate){
if(!isset($this->chunkPopulationQueue[$index])){
$this->chunkPopulationQueue[$index] = true;
for($xx = -1; $xx <= 1; ++$xx){
for($zz = -1; $zz <= 1; ++$zz){
$this->chunkPopulationLock[Level::chunkHash($x + $xx, $z + $zz)] = true;
}
$this->chunkPopulationQueue[$index] = true;
for($xx = -1; $xx <= 1; ++$xx){
for($zz = -1; $zz <= 1; ++$zz){
$this->chunkPopulationLock[Level::chunkHash($x + $xx, $z + $zz)] = true;
}
$task = new PopulationTask($this, $chunk);
$this->server->getAsyncPool()->submitTask($task);
}
$task = new PopulationTask($this, $chunk);
$this->server->getAsyncPool()->submitTask($task);
}
Timings::$populationTimer->stopTiming();