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:
Jason Penilla 2024-11-11 12:17:36 -07:00 committed by GitHub
parent 52fb26524e
commit 661839e033
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 131 additions and 136 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e285c8486c36e8d2bc4ddc43e0029943ea5c7fe7..e9840a1159419593145d166b54e523fd3e6684f0 100644
index a4f140fefaac7e74b6c9834e6b532f20e80b9ab9..0f8a5ad8853052c51989570df10a75bb5b3a1f68 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1137,6 +1137,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1129,6 +1129,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return list;
}