From a4036ed3cbcae94fab8e99d4ad6833f838690020 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 18 Apr 2017 15:08:27 +0100 Subject: [PATCH] Call stopRiding() on a Players death Currently, when a player dies they are not automatically ejected from the entity they are riding, which allows for the ridden entity to affect the players location on respawn (we're still riding it for a part of a tick), as well as allows a dupe to occur with the ridden entity teleporting to the new world with the player --- .../call-stopRiding-on-players-death.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/call-stopRiding-on-players-death.patch diff --git a/Spigot-Server-Patches/call-stopRiding-on-players-death.patch b/Spigot-Server-Patches/call-stopRiding-on-players-death.patch new file mode 100644 index 0000000000..a6ac30961d --- /dev/null +++ b/Spigot-Server-Patches/call-stopRiding-on-players-death.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Tue, 18 Apr 2017 15:01:43 +0100 +Subject: [PATCH] call stopRiding on players death. + +When a death occurs, any entity that the player is riding has the potential to be duplicated, as well as affecting the position of the entities position after respawning + +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index a5c5bd4be..ad3218108 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + entityliving.b(this, this.bb); + } + ++ this.stopRiding(); // Paper - stop riding entities on death, preventing the entity from adjusting our location or duping the ridden entity + this.b(StatisticList.A); + this.a(StatisticList.h); + this.extinguish(); +-- \ No newline at end of file