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] Add Structure check API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b1ad6c47d3d42c93411753d4505ac9142b1697d3..34e8afae13085f0a9ce0c916d911c88c395418e0 100644
index 305e1dc2d727841cd6dd23ec5ec0289e102552f8..e8b1d8fb12280f733b3d96a78991b14dcb4484c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -250,6 +250,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -242,6 +242,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
};
}
// Paper end