Merge branch 'release/3.2' into release/3.3

This commit is contained in:
Dylan K. Taylor 2018-10-24 15:49:09 +01:00
commit 925da62afa
2 changed files with 8 additions and 0 deletions

View File

@ -330,6 +330,10 @@ class BlockFactory{
}
}
public static function isInit() : bool{
return self::$fullList !== null;
}
/**
* Registers a block type into the index. Plugins may use this method to register new block types or override
* existing ones.

View File

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace pocketmine\level\light;
use pocketmine\block\BlockFactory;
use pocketmine\level\format\Chunk;
use pocketmine\level\Level;
use pocketmine\scheduler\AsyncTask;
@ -39,6 +40,9 @@ class LightPopulationTask extends AsyncTask{
}
public function onRun(){
if(!BlockFactory::isInit()){
BlockFactory::init();
}
/** @var Chunk $chunk */
$chunk = Chunk::fastDeserialize($this->chunk);