PaperMC/Spigot-Server-Patches/0111-Don-t-spam-reload-spawn-chunks-in-nether-end.patch

34 lines
1.3 KiB
Diff
Raw Normal View History

2016-12-17 05:23:03 +01:00
From 4feb279f6e509fd05c7527eb936a534168481a71 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
2016-12-17 05:23:03 +01:00
index e52791e..0c460b1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
2016-12-17 05:23:03 +01:00
@@ -3211,6 +3211,7 @@ public abstract class World implements IBlockAccess {
return this.N;
}
2016-11-17 03:23:38 +01: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
2016-11-17 03:23:38 +01:00
index 660f3bc..9adadaf 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
2016-11-17 03:23:38 +01:00
@@ -137,6 +137,6 @@ public abstract class WorldProvider {
public void s() {}
2016-11-17 03:23:38 +01:00
public boolean c(int i, int j) {
- return true;
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
}
}
--
2016-12-11 00:50:31 +01:00
2.9.3