testserver/Spigot-Server-Patches/0105-Don-t-spam-reload-spaw...

34 lines
1.3 KiB
Diff
Raw Normal View History

2017-08-03 14:36:06 +00:00
From 43f5fa426b70b792e3e7c4bb60487ac6ba9473da 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
2017-08-03 14:36:06 +00:00
index 0ee112756..35f0b79d3 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
2017-08-03 14:36:06 +00:00
@@ -3208,6 +3208,7 @@ public abstract class World implements IBlockAccess {
2017-05-14 18:05:01 +00:00
return this.P;
}
2016-11-17 02:23:38 +00:00
+ 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
2017-07-28 13:45:16 +00:00
index d0265f960..35d8d1a6e 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 {
2016-11-17 02:23:38 +00:00
public void s() {}
2016-11-17 02:23:38 +00:00
public boolean c(int i, int j) {
- return true;
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
}
}
--
2017-08-03 14:36:06 +00:00
2.13.3.windows.1