2018-08-18 00:01:37 +02:00
|
|
|
From fe6d2dda85fd9986c6c9b5cbfaa4eaaa60fead62 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
|
2018-08-18 00:01:37 +02:00
|
|
|
index 921add1dc..ff0112c52 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
|
2018-08-04 03:20:57 +02:00
|
|
|
@@ -1136,7 +1136,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
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-07-29 19:12:39 +02:00
|
|
|
int i = entity.ae;
|
|
|
|
int j = entity.ag;
|
2018-07-28 18:13:52 +02:00
|
|
|
|
2018-08-04 03:20:57 +02:00
|
|
|
@@ -1144,6 +1144,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
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) {
|
|
|
|
--
|
|
|
|
2.18.0
|
|
|
|
|