3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch
Shane Freeder abba3d113b
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
bb813f6f SPIGOT-4605: Warn against hacking physics

CraftBukkit Changes:
2ced0233 Don't handle sync packets for kicked players
d5e96882 SPIGOT-4602: Cache reflection in decompile error workaround

Spigot Changes:
b0f4c22b SPIGOT-4605: Catch more physics problems
2019-02-03 15:34:04 +00:00

35 Zeilen
1.4 KiB
Diff

From 050c476f2a947170b6f8564ef94fb1e25e678f04 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 937fd74b1..af6abc2df 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2848,6 +2848,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 5e87e537e..3911e4947 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.20.1