From 48eff610c3a602ae0ae84c4daf35175fe413753d Mon Sep 17 00:00:00 2001 From: AoElite <20812471+AoElite@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:04:00 -0500 Subject: [PATCH] fixed BadPackets E & R falsing on 1.21.2+ players in vehicles --- .../ac/grim/grimac/checks/impl/badpackets/BadPacketsE.java | 3 ++- .../ac/grim/grimac/checks/impl/badpackets/BadPacketsR.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsE.java b/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsE.java index a7d744e60e..6459b22b4d 100644 --- a/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsE.java +++ b/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsE.java @@ -23,7 +23,8 @@ public void onPacketReceive(PacketReceiveEvent event) { noReminderTicks = 0; } else if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType())) { noReminderTicks++; - } else if (event.getPacketType() == PacketType.Play.Client.STEER_VEHICLE) { + } else if (event.getPacketType() == PacketType.Play.Client.STEER_VEHICLE || + event.getPacketType() == PacketType.Play.Client.VEHICLE_MOVE) { noReminderTicks = 0; // Exempt vehicles } diff --git a/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsR.java b/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsR.java index ad536f8f9a..79b86e4909 100644 --- a/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsR.java +++ b/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsR.java @@ -41,7 +41,9 @@ public void onPacketReceive(final PacketReceiveEvent event) { if ((event.getPacketType() == PacketType.Play.Client.PLAYER_POSITION_AND_ROTATION || event.getPacketType() == PacketType.Play.Client.PLAYER_POSITION) && !player.compensatedEntities.getSelf().inVehicle()) { positions++; - } else if (event.getPacketType() == PacketType.Play.Client.STEER_VEHICLE && player.compensatedEntities.getSelf().inVehicle()) { + } else if ((event.getPacketType() == PacketType.Play.Client.STEER_VEHICLE || + event.getPacketType() == PacketType.Play.Client.VEHICLE_MOVE) + && player.compensatedEntities.getSelf().inVehicle()) { positions++; } }