Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
a0b8b886c8
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
CraftBukkit Changes:
d5a72960
SPIGOT-6063: ConsoleSender sending extra lines in Java 13+
Spigot Changes:
2740d5ae Rebuild patches
33 Zeilen
1.6 KiB
Diff
33 Zeilen
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 31 Mar 2020 03:01:45 -0400
|
|
Subject: [PATCH] Fix unregistering entities from unloading chunks
|
|
|
|
CraftBukkit caused a regression here by making unloading chunks not
|
|
have a ticket added and returning unloaded future.
|
|
|
|
This caused entities who were killed in same tick their chunk is unloading
|
|
to not be able to be removed from the chunk.
|
|
|
|
This then results in dead entities lingering in the Chunk.
|
|
|
|
Combine that with a buggy detail of the previous implementation of
|
|
the Dupe UUID patch, then this was the likely source of the "Ghost entities"
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index bd7c3c32809b79218d857f9ae6b4c23220d29ea5..075f9d7b3dffc0285b2152d0e141adb685209f0c 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -1445,9 +1445,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
}
|
|
|
|
private void removeEntityFromChunk(Entity entity) {
|
|
- IChunkAccess ichunkaccess = this.getChunkAt(entity.chunkX, entity.chunkZ, ChunkStatus.FULL, false);
|
|
+ Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways
|
|
|
|
- if (ichunkaccess instanceof Chunk) {
|
|
+ if (ichunkaccess != null) { // Paper
|
|
((Chunk) ichunkaccess).b(entity);
|
|
}
|
|
|