2018-09-18 01:50:02 +00:00
|
|
|
From b2ff0d1f1033ce1fd4b2f4ff692817b76d5ccaeb Mon Sep 17 00:00:00 2001
|
2018-07-28 16:13:52 +00: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
|
2018-09-18 01:50:02 +00:00
|
|
|
index 81777fce64..597169b4cc 100644
|
2018-07-28 16:13:52 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2018-09-18 01:50:02 +00:00
|
|
|
@@ -1172,7 +1172,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-28 16:13:52 +00: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-07-29 17:12:39 +00:00
|
|
|
int i = entity.ae;
|
|
|
|
int j = entity.ag;
|
2018-07-28 16:13:52 +00:00
|
|
|
|
2018-09-18 01:50:02 +00:00
|
|
|
@@ -1180,6 +1180,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-28 16:13:52 +00: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) {
|
|
|
|
--
|
2018-09-15 16:10:26 +00:00
|
|
|
2.19.0
|
2018-07-28 16:13:52 +00:00
|
|
|
|