diff --git a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java index 9ec651f32..8b477c698 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java @@ -117,7 +117,7 @@ public Location getFrom(PlayerMoveEvent event) { } public double getBlocksPerTick(PlayerMoveEvent event) { - double eventSpeedSquared = event.getTo().distance(event.getFrom()); + double eventSpeedSquared = LocationUtil.getNormalizedDistance(event.getTo(), event.getFrom()); if (doIntervalCheck) { Double speedInterval = PLAYER_SPEEDS_INTERVAL.getIfPresent(event.getPlayer().getUniqueId()); if (speedInterval != null) return FastMath.max(speedInterval, eventSpeedSquared); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java b/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java index 6b3b25add..a18ddb4e3 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/modules/elytra/ElytraHelper.java @@ -108,7 +108,7 @@ public Location getFrom(PlayerMoveEvent event) { } public double getBlocksPerTick(PlayerMoveEvent event) { - double eventSpeed = LocationUtil.getFlatDistance(event.getFrom(), event.getTo()); + double eventSpeed = LocationUtil.getNormalizedDistance(event.getFrom(), event.getTo()); if (doIntervalCheck) { Double speedInterval = PLAYER_SPEEDS_INTERVAL.getIfPresent(event.getPlayer().getUniqueId()); if (speedInterval != null) return FastMath.max(speedInterval, eventSpeed);