Paper/Spigot-Server-Patches/0338-Workaround-for-vehicle-tracking-issue-on-disconnect.patch
Aikar 70ad51a80c
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

My recent work on serialization is now in CraftBukkit so was able to drop the patch and Paper
is now consistent with upstream.

Bukkit Changes:
e2699636 Move API notes to more obvious location

CraftBukkit Changes:
1b2830a3 SPIGOT-4441: Fix serializing Components to and from Legacy
2020-06-02 01:29:18 -04:00

25 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: connorhartley <vectrixu+gh@gmail.com>
Date: Mon, 7 Jan 2019 14:43:48 -0600
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 98d480165ff3446317b4c9358a936cd7276cf908..2f09034fd9ee037987de06bbd130b379089ff306 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1291,6 +1291,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void n() {
this.cq = true;
this.ejectPassengers();
+
+ // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount.
+ if (this.isPassenger() && this.getVehicle() instanceof EntityPlayer) {
+ this.stopRiding();
+ }
+ // Paper end
+
if (this.isSleeping()) {
this.wakeup(true, false);
}