From eacc91f30d80c296c2a01e734590fb32601a403e Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 18 Oct 2019 08:05:45 -0700 Subject: [PATCH] =?UTF-8?q?Use=20getIfLoadedImmediately=20and=20not=20cach?= =?UTF-8?q?ed=20immediately=20for=20isLoa=E2=80=A6=20(#2641)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Spigot-Server-Patches/Reduce-sync-loads.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Spigot-Server-Patches/Reduce-sync-loads.patch b/Spigot-Server-Patches/Reduce-sync-loads.patch index 72aa70059a..dc75c990ff 100644 --- a/Spigot-Server-Patches/Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/Reduce-sync-loads.patch @@ -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