World: split populateChunk() into two functions

requestChunkPopulation() respects the queue size, orderChunkPopulation() does not.
requestChunkPopulation() should be used for non-essential generation (which mainly includes generation for player use).
orderChunkPopulation() should probably be used by plugins.
This commit is contained in:
Dylan K. Taylor
2020-12-17 23:49:37 +00:00
parent 48623f4e79
commit 1e737644de
3 changed files with 33 additions and 4 deletions

View File

@ -724,7 +724,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->getWorld()->registerChunkLoader($this->chunkLoader, $X, $Z, true);
$this->getWorld()->registerChunkListener($this, $X, $Z);
if(!$this->getWorld()->populateChunk($X, $Z)){
if(!$this->getWorld()->requestChunkPopulation($X, $Z)){
continue;
}