2016-05-15 22:48:39 +00:00
|
|
|
From ec07f804a484921eea0a5440f15c2ebe95ff7469 Mon Sep 17 00:00:00 2001
|
2016-04-05 23:53:30 +00:00
|
|
|
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-05-15 22:48:39 +00:00
|
|
|
index 75b95b4..91bbc75 100644
|
2016-04-05 23:53:30 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2016-05-15 22:48:39 +00:00
|
|
|
@@ -3225,6 +3225,7 @@ public abstract class World implements IBlockAccess {
|
2016-04-05 23:53:30 +00:00
|
|
|
return this.N;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public boolean shouldStayLoaded(int i, int j) { return c(i, j); } // Paper - OBFHELPER
|
|
|
|
public boolean c(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 2d761d4..bc1eaf5 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
|
|
@@ -127,7 +127,7 @@ public abstract class WorldProvider {
|
|
|
|
|
|
|
|
public void r() {}
|
|
|
|
|
|
|
|
- public boolean c(int i, int j) {
|
|
|
|
- return true;
|
|
|
|
+ public boolean c(int i, int j) { // Method is "can chunk unload"
|
|
|
|
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2016-05-12 02:07:46 +00:00
|
|
|
2.8.2
|
2016-04-05 23:53:30 +00:00
|
|
|
|