mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
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.
This commit is contained in:
parent
002f030970
commit
ce8d9fa9f4
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user