aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2023-09-23 22:10:40 -0700
committerSpottedleaf <[email protected]>2023-09-23 22:31:42 -0700
commit84556f3cdae93799d34df9b9ad495fe59061b060 (patch)
treed78ff563dc71f3427eb486cf966edb7fbf40fcf0 /patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch
parent38dc3b25d8d7ff5a14fbcc70ef16541ed396db4f (diff)
downloadPaper-84556f3cdae93799d34df9b9ad495fe59061b060.tar.gz
Paper-84556f3cdae93799d34df9b9ad495fe59061b060.zip
Add lag compensation for breaking blocks
Diffstat (limited to 'patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch')
-rw-r--r--patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch
new file mode 100644
index 0000000000..639d0cea98
--- /dev/null
+++ b/patches/server/0781-Don-t-allow-vehicle-movement-from-players-while-tele.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Spottedleaf <[email protected]>
+Date: Mon, 14 Mar 2022 12:35:37 -0700
+Subject: [PATCH] Don't allow vehicle movement from players while teleporting
+
+Bring the vehicle move packet behavior in line with the
+regular player move packet.
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index 4359f05f6c45393e491d5a0d588c9fe8aa1f1dfb..1affbdc7141cc48fa878f4e8f7364e4cc7f5d1a1 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -463,6 +463,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ this.disconnect(Component.translatable("multiplayer.disconnect.invalid_vehicle_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_VEHICLE_MOVEMENT); // Paper - kick event cause
+ } else {
+ Entity entity = this.player.getRootVehicle();
++ // Paper start
++ if (this.awaitingPositionFromClient != null || this.player.isImmobile() || entity.isRemoved()) {
++ return;
++ }
++ // Paper end
+
+ if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
+ ServerLevel worldserver = this.player.serverLevel();