diff options
Diffstat (limited to 'patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch')
-rw-r--r-- | patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch index 5030feaf00..a0023ba6e1 100644 --- a/patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0728-Warn-on-plugins-accessing-faraway-chunks.patch @@ -18,10 +18,10 @@ index b4111bcc6a676dc42b233761aa667708669c2ab8..cc92d2e8b77c75da1d8b850c3bc251e8 private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1cd5b35496 100644 +index a1912eb5fd26898d7e9848ffb2052fce2fa10868..cb28a7504e809a8b1e8ab6e34e14e414c542055f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -295,9 +295,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -305,9 +305,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z) { return this.setSpawnLocation(x, y, z, 0.0F); } @@ -46,7 +46,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); if (chunk == null) { -@@ -403,6 +418,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -413,6 +428,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!unloadChunk0(x, z, false)) { return false; } @@ -54,7 +54,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c final long chunkKey = ChunkCoordIntPair.pair(x, z); world.getChunkProvider().unloadQueue.remove(chunkKey); -@@ -476,6 +492,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -486,6 +502,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot @@ -62,7 +62,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper // If generate = false, but the chunk already exists, we will get this back. -@@ -508,6 +525,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -518,6 +535,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -608,6 +626,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -618,6 +636,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c this.getHandle().setChunkForced(x, z, forced); } -@@ -936,6 +955,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -946,6 +965,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -86,7 +86,7 @@ index c0c26825865404231f57883447328c84cdf32d82..0c5a583f2ced1ae5e1e92a045ef2ef1c // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2333,6 +2353,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2343,6 +2363,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot end // Paper start public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { |