mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +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);
|
$this->level->registerChunkLoader($this, $X, $Z, false);
|
||||||
|
|
||||||
if(!$this->level->populateChunk($X, $Z)){
|
if(!$this->level->populateChunk($X, $Z)){
|
||||||
if($this->spawned and $this->teleportPosition === null){
|
continue;
|
||||||
continue;
|
|
||||||
}else{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($this->loadQueue[$index]);
|
unset($this->loadQueue[$index]);
|
||||||
@ -4192,6 +4188,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
public function onChunkChanged(Chunk $chunk){
|
public function onChunkChanged(Chunk $chunk){
|
||||||
if(isset($this->usedChunks[$hash = Level::chunkHash($chunk->getX(), $chunk->getZ())])){
|
if(isset($this->usedChunks[$hash = Level::chunkHash($chunk->getX(), $chunk->getZ())])){
|
||||||
$this->usedChunks[$hash] = false;
|
$this->usedChunks[$hash] = false;
|
||||||
|
if(!$this->spawned){
|
||||||
|
$this->nextChunkOrderRun = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user