2021-06-11 14:02:28 +02:00
|
|
|
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/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2024-01-16 19:27:39 +01:00
|
|
|
index 7a5977aa72a0a198144d7b490abe0685326de260..8cc33c1b14668c085dbad1f3feabf7b602812471 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2023-12-29 20:57:32 +01:00
|
|
|
@@ -1749,6 +1749,13 @@ public class ServerPlayer extends Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
public void disconnect() {
|
|
|
|
this.disconnected = true;
|
|
|
|
this.ejectPassengers();
|
|
|
|
+
|
|
|
|
+ // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount.
|
|
|
|
+ if (this.isPassenger() && this.getVehicle() instanceof ServerPlayer) {
|
|
|
|
+ this.stopRiding();
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
if (this.isSleeping()) {
|
|
|
|
this.stopSleepInBed(true, false);
|
|
|
|
}
|