Player: fixed a mistake in generation rate limit

we don't want to allow sending further chunks when we haven't generated near ones, because we won't be able to see them anyway, and we might end up not needing them.
This now fully matches the results of PM3.
This commit is contained in:
Dylan K. Taylor 2021-11-06 00:57:37 +00:00
parent 6cd272c9e1
commit 640e88009b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -686,7 +686,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$count = 0;
$world = $this->getWorld();
foreach($this->loadQueue as $index => $distance){
if($count >= $this->chunksPerTick || count($this->activeChunkGenerationRequests) >= $this->chunksPerTick){
if($count >= $this->chunksPerTick - count($this->activeChunkGenerationRequests)){
break;
}