mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
|
From fb9a4072a4c5fd2d0e109e626e49e348463d0ef7 Mon Sep 17 00:00:00 2001
|
||
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||
|
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
|
||
|
@@ -495,6 +495,7 @@ 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();
|
||
|
--
|
||
|
2.12.2
|
||
|
|