5b6dfb3463
This work is 100% unfinished. I am pushing it up so that we as a team can work on this update. Do not try to use this branch. You will fail.
35 Zeilen
1.4 KiB
Diff
35 Zeilen
1.4 KiB
Diff
From 25f92cc47e0b7f71bd08f03787a8c1fcb353d536 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 9fdedc2d7..3bf2cb8d0 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -2817,6 +2817,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
|
return this.K;
|
|
}
|
|
|
|
+ public boolean shouldStayLoaded(int i, int j) { return g(i, j); } // Paper - OBFHELPER
|
|
public boolean g(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 6b62235e5..26ef3a41f 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
@@ -69,7 +69,7 @@ public abstract class WorldProvider {
|
|
public void l() {}
|
|
|
|
public boolean a(int i, int j) {
|
|
- return true;
|
|
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
|
|
}
|
|
|
|
protected abstract void m();
|
|
--
|
|
2.18.0
|
|
|