papermc/Spigot-Server-Patches/0108-Don-t-spam-reload-spawn-chunks-in-nether-end.patch
Zach Brown 7f3aa1ed29
Update upstream B/CB/S
Closes GH-631
2017-03-15 09:32:50 -05:00

33 lines
1.3 KiB
Diff

From f598f947d03f1a94dfd8d801737000f96d4d1a4b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 358c1d43..bad504fe 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3189,6 +3189,7 @@ public abstract class World implements IBlockAccess {
return this.N;
}
+ public boolean shouldStayLoaded(int i, int j) { return e(i, j); } // Paper - OBFHELPER
public boolean e(int i, int j) {
BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index a27512c0..4691b3d8 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -138,6 +138,6 @@ public abstract class WorldProvider {
public void s() {}
public boolean c(int i, int j) {
- return true;
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
}
}
--
2.12.0.windows.1