Player: Fixed sluggish chunk updates when not moving

Always order chunks ASAP on chunk change, not just during the spawn sequence. This fixes the sluggishness observed in BlockSniper when doing async chunk modifications.
This commit is contained in:
Dylan K. Taylor 2018-12-30 17:32:38 +00:00
parent d2d65ce6cc
commit e0e2e1775f

View File

@ -3886,9 +3886,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
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;
}
$this->nextChunkOrderRun = 0;
}
}