mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-14 22:01:59 +00:00
Merge branch 'release/3.0' into release/3.1
This commit is contained in:
commit
6f00a30ad7
@ -2943,20 +2943,19 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($populate){
|
if($populate){
|
||||||
if(!isset($this->chunkPopulationQueue[$index])){
|
$this->chunkPopulationQueue[$index] = true;
|
||||||
$this->chunkPopulationQueue[$index] = true;
|
for($xx = -1; $xx <= 1; ++$xx){
|
||||||
for($xx = -1; $xx <= 1; ++$xx){
|
for($zz = -1; $zz <= 1; ++$zz){
|
||||||
for($zz = -1; $zz <= 1; ++$zz){
|
$this->chunkPopulationLock[Level::chunkHash($x + $xx, $z + $zz)] = true;
|
||||||
$this->chunkPopulationLock[Level::chunkHash($x + $xx, $z + $zz)] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$task = new PopulationTask($this, $chunk);
|
|
||||||
$workerId = $this->server->getAsyncPool()->selectWorker();
|
|
||||||
if(!isset($this->generatorRegisteredWorkers[$workerId])){
|
|
||||||
$this->registerGeneratorToWorker($workerId);
|
|
||||||
}
|
|
||||||
$this->server->getAsyncPool()->submitTaskToWorker($task, $workerId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$task = new PopulationTask($this, $chunk);
|
||||||
|
$workerId = $this->server->getAsyncPool()->selectWorker();
|
||||||
|
if(!isset($this->generatorRegisteredWorkers[$workerId])){
|
||||||
|
$this->registerGeneratorToWorker($workerId);
|
||||||
|
}
|
||||||
|
$this->server->getAsyncPool()->submitTaskToWorker($task, $workerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Timings::$populationTimer->stopTiming();
|
Timings::$populationTimer->stopTiming();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user