From cfebf1baa7ee9641f6f47512b4a45e13f9bfa841 Mon Sep 17 00:00:00 2001 From: Toshimichi0915 <main@toshimichi.net> Date: Fri, 25 Dec 2020 01:31:13 -0500 Subject: [PATCH] Fix lead duplication --- ...m-duplication-issues-and-teleport-is.patch | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/Fix-numerous-item-duplication-issues-and-teleport-is.patch index c90ab214e9..15bef9aadf 100644 --- a/Spigot-Server-Patches/Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -48,14 +48,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.world.getMethodProfiler().enter("changeDimension"); // CraftBukkit start @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - entity.bukkitEntity = this.getBukkitEntity(); + // CraftBukkit end - if (this instanceof EntityInsentient) { + this.world.getMethodProfiler().exitEnter("reloading"); ++ // Paper start - Change lead drop timing to prevent dupe ++ if (this instanceof EntityInsentient) { ++ ((EntityInsentient) this).unleash(true, true); // Paper drop lead ++ } ++ // Paper end + Entity entity = this.getEntityType().a((World) worldserver); + + if (entity != null) { +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // CraftBukkit start - Forward the CraftEntity to the new entity + this.getBukkitEntity().setHandle(entity); + entity.bukkitEntity = this.getBukkitEntity(); +- +- if (this instanceof EntityInsentient) { - ((EntityInsentient) this).unleash(true, false); // Unleash to prevent duping of leads. -+ ((EntityInsentient) this).unleash(true, true); // Paper drop lead - } +- } // CraftBukkit end } + @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }