mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
World: eliminate final remaining 'no loaders attached' debug message on player creation
This commit is contained in:
parent
018006541e
commit
4fe3f69702
@ -2801,6 +2801,8 @@ class World implements ChunkManager{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$temporaryChunkLoader = new class implements ChunkLoader{};
|
||||||
|
$this->registerChunkLoader($temporaryChunkLoader, $x, $z);
|
||||||
$chunk = $this->loadChunk($x, $z);
|
$chunk = $this->loadChunk($x, $z);
|
||||||
if($chunk === null || !$chunk->isPopulated()){
|
if($chunk === null || !$chunk->isPopulated()){
|
||||||
Timings::$population->startTiming();
|
Timings::$population->startTiming();
|
||||||
@ -2811,11 +2813,12 @@ class World implements ChunkManager{
|
|||||||
$this->chunkPopulationRequestMap[$index] = $promise;
|
$this->chunkPopulationRequestMap[$index] = $promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
$temporaryChunkLoader = new class implements ChunkLoader{};
|
|
||||||
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->lockChunk($x + $xx, $z + $zz);
|
$this->lockChunk($x + $xx, $z + $zz);
|
||||||
$this->registerChunkLoader($temporaryChunkLoader, $x + $xx, $z + $zz);
|
if($xx !== 0 || $zz !== 0){ //avoid registering it twice for the center chunk; we already did that above
|
||||||
|
$this->registerChunkLoader($temporaryChunkLoader, $x + $xx, $z + $zz);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2830,6 +2833,8 @@ class World implements ChunkManager{
|
|||||||
return $promise;
|
return $promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->unregisterChunkLoader($temporaryChunkLoader, $x, $z);
|
||||||
|
|
||||||
//chunk is already populated; return a pre-resolved promise that will directly fire callbacks assigned
|
//chunk is already populated; return a pre-resolved promise that will directly fire callbacks assigned
|
||||||
$result = new Promise();
|
$result = new Promise();
|
||||||
$result->resolve($chunk);
|
$result->resolve($chunk);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user