mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed players taking forever to spawn when generating a new world
This commit is contained in:
parent
ec079b68a6
commit
1dd8fc008b
@ -852,11 +852,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$this->level->registerChunkLoader($this, $X, $Z, false);
|
||||
|
||||
if(!$this->level->populateChunk($X, $Z)){
|
||||
if($this->spawned and $this->teleportPosition === null){
|
||||
continue;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
unset($this->loadQueue[$index]);
|
||||
@ -4192,6 +4188,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
public function onChunkChanged(Chunk $chunk){
|
||||
if(isset($this->usedChunks[$hash = Level::chunkHash($chunk->getX(), $chunk->getZ())])){
|
||||
$this->usedChunks[$hash] = false;
|
||||
if(!$this->spawned){
|
||||
$this->nextChunkOrderRun = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user