Improve chunk loaded checks
This commit is contained in:
@@ -9,7 +9,7 @@ waiting for the execution queue to get to our request; We can just query
|
||||
the chunk status and get a response now, vs having to wait
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0328eadf27..7b17a634c2 100644
|
||||
index 0328eadf27..4e1fd76bbd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
@@ -18,7 +18,7 @@ index 0328eadf27..7b17a634c2 100644
|
||||
public boolean isChunkLoaded(int x, int z) {
|
||||
- net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false);
|
||||
- return chunk != null;
|
||||
+ return world.getChunkProvider().isLoaded(x, z);// Paper
|
||||
+ return world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z) != null; // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user