mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Merge branch 'release/3.4'
This commit is contained in:
commit
a7eaec13b9
@ -441,6 +441,10 @@ class BlockFactory{
|
|||||||
//TODO: RESERVED6
|
//TODO: RESERVED6
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
* Registers a block type into the index. Plugins may use this method to register new block types or override
|
||||||
* existing ones.
|
* existing ones.
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\level\light;
|
namespace pocketmine\level\light;
|
||||||
|
|
||||||
|
use pocketmine\block\BlockFactory;
|
||||||
use pocketmine\level\format\Chunk;
|
use pocketmine\level\format\Chunk;
|
||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
use pocketmine\scheduler\AsyncTask;
|
use pocketmine\scheduler\AsyncTask;
|
||||||
@ -37,6 +38,9 @@ class LightPopulationTask extends AsyncTask{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onRun() : void{
|
public function onRun() : void{
|
||||||
|
if(!BlockFactory::isInit()){
|
||||||
|
BlockFactory::init();
|
||||||
|
}
|
||||||
/** @var Chunk $chunk */
|
/** @var Chunk $chunk */
|
||||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user