Moved spawn check to sendChunk() instead of sendNextChunk(), fix #828

doesn't make sense to put it anywhere else regardless...
This commit is contained in:
Dylan K. Taylor 2017-06-27 13:36:26 +01:00
parent 4a7c40edd5
commit d92a6240d8

View File

@ -826,6 +826,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
}
}
if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){
$this->doFirstSpawn();
}
}
protected function sendNextChunk(){
@ -859,10 +863,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->level->requestChunk($X, $Z, $this);
}
if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){
$this->doFirstSpawn();
}
Timings::$playerChunkSendTimer->stopTiming();
}