From 30cb7d0407bfb01a3bc0cc2da1dc0af32dfae5a4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 28 Feb 2022 15:31:41 +0000 Subject: [PATCH] ignore excessive vel for Minecarts (Fixes #7515) --- patches/server/0054-Add-velocity-warnings.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/server/0054-Add-velocity-warnings.patch b/patches/server/0054-Add-velocity-warnings.patch index 4b8b7ba74..35d5cd88b 100644 --- a/patches/server/0054-Add-velocity-warnings.patch +++ b/patches/server/0054-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f421e55cc6c629f3718d0c7f4cb7ff287c2b643f..b6e9c6fc7f31b06f77cf108ee0f5548cd530ba5a 100644 +index c50fdc09494895eaf6813493bdc6a370089d4240..c77db10a1c33266da8d4578e828ff039d550b292 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -282,6 +282,7 @@ public final class CraftServer implements Server { @@ -17,7 +17,7 @@ index f421e55cc6c629f3718d0c7f4cb7ff287c2b643f..b6e9c6fc7f31b06f77cf108ee0f5548c static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index fdbcf4989f72e1604a2841f565adfeebf8d45622..4ebd7609ec2bf62586feef4da7605dbb89569567 100644 +index fdbcf4989f72e1604a2841f565adfeebf8d45622..1e0b8314ef388763aa43055909e48778f0d421a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -438,10 +438,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -25,7 +25,7 @@ index fdbcf4989f72e1604a2841f565adfeebf8d45622..4ebd7609ec2bf62586feef4da7605dbb Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); + // Paper start - Warn server owners when plugins try to set super high velocities -+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) { ++ if (!(this instanceof org.bukkit.entity.Projectile || this instanceof org.bukkit.entity.Minecart) && isUnsafeVelocity(velocity)) { + CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ")."); + } + // Paper end