Fix and optimize getChunkCount (#11610)
It was returning ticking chunk count instead of the intended full chunk count. We can also directly use the size of the fullChunks collection instead of iterating all chunks.
This commit is contained in:
@@ -5353,6 +5353,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
private NaturalSpawner.SpawnState lastSpawnState;
|
||||
+ // Paper start
|
||||
+ private final ca.spottedleaf.concurrentutil.map.ConcurrentLong2ReferenceChainedHashTable<net.minecraft.world.level.chunk.LevelChunk> fullChunks = new ca.spottedleaf.concurrentutil.map.ConcurrentLong2ReferenceChainedHashTable<>();
|
||||
+ public int getFullChunksCount() {
|
||||
+ return this.fullChunks.size();
|
||||
+ }
|
||||
+ long chunkFutureAwaitCounter;
|
||||
+ // Paper end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user