13
0
geforkt von Mirrors/Paper
Paper/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch
Aikar 9dc4d6448b
Numerous fixes to entity related changes
While it wasn't really "broken" before, if plugins use NMS
(which they really should't be) and mess with entity management
themselves, and get it wrong, they could ultimately corrupt our
state expectations.

I've been unable to reproduce any issues locally, but these changes
are the result of me analyzing the code pretty deeply and seeing
about how to make it more durable to abnormal usage.

Any servers seeing oddities, please run with -Ddebug.entities=true
and send me any logs triggered.
2019-04-05 23:08:45 -04:00

35 Zeilen
1.4 KiB
Diff

From e967f3bcc7b0a00d5282d2a2d5976e1e48107238 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 b595536648..5fc2da0d92 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2849,6 +2849,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.K;
}
+ public boolean isSpawnChunk(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
index 5e87e537e4..3911e4947e 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 !this.b.isForceLoaded(i, j);
+ return !this.b.isSpawnChunk(i, j) && !this.b.isForceLoaded(i, j); // Paper - Use spawn chunks check for all worlds
}
protected abstract void m();
--
2.21.0