Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
c02c01b2c5
Also removes our toggle for Spigot's option, I doubt anyone uses it.
36 Zeilen
1.4 KiB
Diff
36 Zeilen
1.4 KiB
Diff
From f92ff94754c90af1cc7556ed76a3f6c69baac671 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 4452107..34b10c4 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -3245,6 +3245,7 @@ public abstract class World implements IBlockAccess {
|
|
return this.N;
|
|
}
|
|
|
|
+ public boolean shouldStayLoaded(int i, int j) { return d(i, j); } // Paper - OBFHELPER
|
|
public boolean d(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 e30d346..d1b2d15 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
|
|
}
|
|
}
|
|
--
|
|
2.10.0.windows.1
|
|
|