mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Use getIfLoadedImmediately and not cached immediately for isLoa… (#2641)
This commit is contained in:
parent
987af1a1e4
commit
eacc91f30d
1 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@ it must be enabled by setting the startup flag -Dpaper.debug-sync-loads=true
|
|||
To get a debug log for sync loads, the command is /paper syncloadinfo
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index 09efbf725..132397b3f 100644
|
||||
index 09efbf7250..132397b3f3 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -91,7 +91,7 @@ index 09efbf725..132397b3f 100644
|
|||
if (args.length < 2 || args[1].equals("*")) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
new file mode 100644
|
||||
index 000000000..59aec1032
|
||||
index 0000000000..59aec10329
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -268,7 +268,7 @@ index 000000000..59aec1032
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index f793ba08e..c8451afec 100644
|
||||
index 277c2245d7..8d7971ad80 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -280,7 +280,7 @@ index f793ba08e..c8451afec 100644
|
|||
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
|
||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b81b37445..9d29fc8ca 100644
|
||||
index b81b37445c..9d29fc8ca4 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
|
@ -328,7 +328,7 @@ index b81b37445..9d29fc8ca 100644
|
|||
if (chunk != null) {
|
||||
chunk.a(oclass, axisalignedbb, list, predicate);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0c1f4e6e1..845575f52 100644
|
||||
index 0c1f4e6e1e..bc2942fe83 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
@ -338,7 +338,7 @@ index 0c1f4e6e1..845575f52 100644
|
|||
+ // Paper start
|
||||
+ @Override
|
||||
+ public boolean isChunkLoaded(int x, int z) {
|
||||
+ return this.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null;
|
||||
+ return this.getChunkProvider().getChunkAtIfLoadedImmediately(x, z) != null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
|
|
Loading…
Reference in a new issue