mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
PopulationTask: check the correct instance
This commit is contained in:
parent
d585081c22
commit
78c270a96e
@ -27,7 +27,6 @@ use pocketmine\block\BlockFactory;
|
|||||||
use pocketmine\scheduler\AsyncTask;
|
use pocketmine\scheduler\AsyncTask;
|
||||||
use pocketmine\world\format\Chunk;
|
use pocketmine\world\format\Chunk;
|
||||||
use pocketmine\world\format\io\FastChunkSerializer;
|
use pocketmine\world\format\io\FastChunkSerializer;
|
||||||
use pocketmine\world\SimpleChunkManager;
|
|
||||||
use pocketmine\world\World;
|
use pocketmine\world\World;
|
||||||
|
|
||||||
class PopulationTask extends AsyncTask{
|
class PopulationTask extends AsyncTask{
|
||||||
@ -75,7 +74,7 @@ class PopulationTask extends AsyncTask{
|
|||||||
public function onRun() : void{
|
public function onRun() : void{
|
||||||
$manager = $this->worker->getFromThreadStore("generation.world{$this->worldId}.manager");
|
$manager = $this->worker->getFromThreadStore("generation.world{$this->worldId}.manager");
|
||||||
$generator = $this->worker->getFromThreadStore("generation.world{$this->worldId}.generator");
|
$generator = $this->worker->getFromThreadStore("generation.world{$this->worldId}.generator");
|
||||||
if(!($manager instanceof SimpleChunkManager) or !($generator instanceof Generator)){
|
if(!($manager instanceof GeneratorChunkManager) or !($generator instanceof Generator)){
|
||||||
$this->state = false;
|
$this->state = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user