World: Fixed inverted completion callbacks for chunk population

this would have caused any chunk populated by a plugin to remain loaded forever.
This commit is contained in:
Dylan K. Taylor 2021-05-07 23:39:44 +01:00
parent f9bfc0df73
commit 998a583815
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2706,8 +2706,8 @@ class World implements ChunkManager{
$temporaryLoader = new class implements ChunkLoader{};
$this->registerChunkLoader($temporaryLoader, $chunkX, $chunkZ);
$promise->onCompletion(
static function() : void{},
fn() => $this->unregisterChunkLoader($temporaryLoader, $chunkX, $chunkZ)
fn() => $this->unregisterChunkLoader($temporaryLoader, $chunkX, $chunkZ),
static function() : void{}
);
}
return $promise;