3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0319-Always-process-chunk-removal-in-removeEntity.patch
Aikar a4e7bdb306
[Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-05 18:55:03 -04:00

34 Zeilen
1.5 KiB
Diff

From a52bf404ca97594f73558a6cd477bdc6adb1f4e6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Jul 2018 12:09:20 -0400
Subject: [PATCH] Always process chunk removal in removeEntity
Spigot might skip chunk registration changes in removeEntity
which can keep them in the chunk when they shouldnt be if done
during entity ticking.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 921add1d..ff0112c5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1136,7 +1136,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
this.everyoneSleeping();
}
- if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking
+ // if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - move down
int i = entity.ae;
int j = entity.ag;
@@ -1144,6 +1144,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
this.getChunkAt(i, j).b(entity);
}
+ if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above
// CraftBukkit start - Decrement loop variable field if we've already ticked this entity
int index = this.entityList.indexOf(entity);
if (index != -1) {
--
2.18.0