From ce8d9fa9f4736885362d29b73ca3172abb29cab4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 2 Feb 2019 11:59:40 +0000 Subject: [PATCH] Player: load chunks when registering as a loader, closes #2726 populateChunk() _sometimes_ does this, but not if the chunk is locked. This means that the empty chunk needed to prevent the shit hitting the fan isn't created when chunks are locked. This change resolves the problem because registerChunkLoader() calls loadChunk() with the create parameter as true when autoload is used. This is a shitty fix but it's the simplest one we have right now, and it works well. --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 193c8e58a..7e6840895 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -976,7 +976,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ ++$count; $this->usedChunks[$index] = false; - $this->level->registerChunkLoader($this, $X, $Z, false); + $this->level->registerChunkLoader($this, $X, $Z, true); if(!$this->level->populateChunk($X, $Z)){ continue;