mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
24 lines
1.1 KiB
Diff
24 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/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index c5635f20a64a2d3dfcf4aeab8dff8de59b85bbe1..401b8f203ac0147c250ffd999003d0a6f2fd90fd 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1538,6 +1538,13 @@ public class ServerPlayer extends Player {
|
|
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);
|
|
}
|