2019-02-03 16:34:04 +01:00
|
|
|
From 46d34d7499b61271b55499dc09d080afdaa2574f Mon Sep 17 00:00:00 2001
|
2018-07-28 18:13:52 +02:00
|
|
|
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
|
2019-02-03 16:34:04 +01:00
|
|
|
index 7eb15fbb5..63588cd0c 100644
|
2018-07-28 18:13:52 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2019-02-03 16:34:04 +01:00
|
|
|
@@ -1107,7 +1107,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-28 18:13:52 +02:00
|
|
|
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
|
2018-12-17 06:18:06 +01:00
|
|
|
int i = entity.chunkX;
|
|
|
|
int j = entity.chunkZ;
|
2018-07-28 18:13:52 +02:00
|
|
|
|
2019-02-03 16:34:04 +01:00
|
|
|
@@ -1115,6 +1115,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-28 18:13:52 +02:00
|
|
|
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) {
|
|
|
|
--
|
2019-01-01 04:15:55 +01:00
|
|
|
2.20.1
|
2018-07-28 18:13:52 +02:00
|
|
|
|