aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-12-21 00:16:45 +0100
committerNassim Jahnke <[email protected]>2024-12-21 00:16:55 +0100
commit1dc6ad1df07e018ee68d95464022285f27fff916 (patch)
tree420a1afaf70dea1abb4cdc1c05a23956cf28ebbd
parenta18b1b7ef1dd6d16a4224fca17d56733b5fb7852 (diff)
downloadPaper-1dc6ad1df07e018ee68d95464022285f27fff916.tar.gz
Paper-1dc6ad1df07e018ee68d95464022285f27fff916.zip
Fix vehicle movement check
-rw-r--r--paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
index c4a14444de..c53210937f 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
@@ -211,9 +211,9 @@
+ double currDeltaY = toY - y;
+ double currDeltaZ = toZ - z;
+ d7 = Math.max(d7, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
-+ double otherFieldX = d3 - this.vehicleLastGoodX;
-+ double otherFieldY = d4 - this.vehicleLastGoodY;
-+ double otherFieldZ = d5 - this.vehicleLastGoodZ;
++ double otherFieldX = toX - this.vehicleLastGoodX;
++ double otherFieldY = toY - this.vehicleLastGoodY;
++ double otherFieldZ = toZ - this.vehicleLastGoodZ;
+ d7 = Math.max(d7, (otherFieldX * otherFieldX + otherFieldY * otherFieldY + otherFieldZ * otherFieldZ) - 1);
+ // Paper end - fix large move vectors killing the server
+
@@ -251,7 +251,7 @@
+ return;
+ }
+ // Paper end - Prevent moving into unloaded chunks
-+ if (d7 - d6 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
++ if (d7 - d6 > Math.max(100.0, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
+ // CraftBukkit end
LOGGER.warn(
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5