2016-06-23 04:43:02 +02:00
|
|
|
From 980f9cd6c2c465296f3fc12611f285e7e9b3f573 Mon Sep 17 00:00:00 2001
|
2016-04-06 01:53:30 +02: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-06-23 04:43:02 +02:00
|
|
|
index 539100b..5400a53 100644
|
2016-04-06 01:53:30 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2016-06-23 04:43:02 +02:00
|
|
|
@@ -3238,6 +3238,7 @@ public abstract class World implements IBlockAccess {
|
2016-04-06 01:53:30 +02:00
|
|
|
return this.N;
|
|
|
|
}
|
|
|
|
|
2016-06-09 05:57:14 +02:00
|
|
|
+ public boolean shouldStayLoaded(int i, int j) { return d(i, j); } // Paper - OBFHELPER
|
|
|
|
public boolean d(int i, int j) {
|
2016-04-06 01:53:30 +02:00
|
|
|
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-06-09 05:57:14 +02:00
|
|
|
index e30d346..d1b2d15 100644
|
2016-04-06 01:53:30 +02:00
|
|
|
--- 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-06-23 04:18:41 +02:00
|
|
|
2.9.0
|
2016-04-06 01:53:30 +02:00
|
|
|
|