Level: remove nonsensical code from generateChunkCallback()

it's impossible for this to be null when we just set it to a Chunk object. It's assigned directly to the chunk index.
This commit is contained in:
Dylan K. Taylor 2018-06-01 19:47:47 +01:00
parent 5d07f66d86
commit b6b0bbde18

View File

@ -2307,8 +2307,7 @@ class Level implements ChunkManager, Metadatable{
}
unset($this->chunkPopulationQueue[$index]);
$this->setChunk($x, $z, $chunk, false);
$chunk = $this->getChunk($x, $z, false);
if($chunk !== null and ($oldChunk === null or !$oldChunk->isPopulated()) and $chunk->isPopulated()){
if(($oldChunk === null or !$oldChunk->isPopulated()) and $chunk->isPopulated()){
$this->server->getPluginManager()->callEvent(new ChunkPopulateEvent($this, $chunk));
foreach($this->getChunkLoaders($x, $z) as $loader){