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:
Dylan K. Taylor 2019-02-02 11:59:40 +00:00
parent 002f030970
commit ce8d9fa9f4

View File

@ -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;