From cc597bfd1d00317c78243426cab046750e8b8818 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Tue, 31 Jul 2018 16:39:15 -0500 Subject: [PATCH 1/2] Ensure players are not marked to be removed after re-add --- ...gnore-Dead-Entities-in-entityList-iteration.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch index a083f72389..112e654570 100644 --- a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch @@ -23,7 +23,7 @@ index ecd1c65a9..1898ab897 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 89f9bd347..d163acd8f 100644 +index 1e64d5fcd..45e149f4a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -35,9 +35,17 @@ index 89f9bd347..d163acd8f 100644 public float length; public float I; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index df98a4f44..8f82fbf67 100644 +index 0dca11b2c..dadd4b839 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + } + + entity.valid = true; // CraftBukkit ++ entity.shouldBeRemoved = false; + new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid + } + @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { if (entity.aa && this.isChunkLoaded(i, j, true)) { this.getChunkAt(i, j).b(entity); From 8930ecd00ec2756ffd37f1c8336613bdd8362b69 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Tue, 31 Jul 2018 16:41:33 -0500 Subject: [PATCH 2/2] [CI-SKIP] Add paper comment to last patch edit --- .../Ignore-Dead-Entities-in-entityList-iteration.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch index 112e654570..3ea5bf4e6e 100644 --- a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch @@ -42,7 +42,7 @@ index 0dca11b2c..dadd4b839 100644 } entity.valid = true; // CraftBukkit -+ entity.shouldBeRemoved = false; ++ entity.shouldBeRemoved = false; // Paper - shouldn't be removed after being re-added new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid }