aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch')
-rw-r--r--patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch
index af6e2a5b7a..a0023ba6e1 100644
--- a/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch
+++ b/patches/server/0729-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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be058823a5aa25 100644
+index a1912eb5fd26898d7e9848ffb2052fce2fa10868..cb28a7504e809a8b1e8ab6e34e14e414c542055f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-@@ -301,9 +301,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
// 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) {
-@@ -409,6 +424,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
final long chunkKey = ChunkCoordIntPair.pair(x, z);
world.getChunkProvider().unloadQueue.remove(chunkKey);
-@@ -482,6 +498,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
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.
-@@ -514,6 +531,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
Preconditions.checkArgument(plugin != null, "null plugin");
Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
-@@ -614,6 +632,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
this.getHandle().setChunkForced(x, z, forced);
}
-@@ -942,6 +961,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 780a9f0220018eda9e67f0ce9f27adea643f3f82..3e083ba67d0a89dd1aef5d06f7be0588
// Transient load for this tick
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
}
-@@ -2339,6 +2359,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) {