From 9d138d6f0dd14b9d66938f51f0c69a522e2bb2b9 Mon Sep 17 00:00:00 2001 From: FirstMegaGame4 <84094287+FirstMegaGame4@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:49:18 +0100 Subject: [PATCH] Fix AnimationUtils --- .../mmodding_lib/library/client/utils/AnimationUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/mmodding/mmodding_lib/library/client/utils/AnimationUtils.java b/src/main/java/com/mmodding/mmodding_lib/library/client/utils/AnimationUtils.java index ae6e3e4..7913d0c 100644 --- a/src/main/java/com/mmodding/mmodding_lib/library/client/utils/AnimationUtils.java +++ b/src/main/java/com/mmodding/mmodding_lib/library/client/utils/AnimationUtils.java @@ -8,9 +8,9 @@ @ClientOnly public class AnimationUtils { - public boolean isMoving(LivingEntity livingEntity, float limbSwingAmount, float motionThreshold) { + public static boolean isMoving(LivingEntity livingEntity, float limbDistance, float motionThreshold) { Vec3d velocity = livingEntity.getVelocity(); float averageVelocity = (MathHelper.abs((float) velocity.x) + MathHelper.abs((float) velocity.z)) / 2f; - return averageVelocity >= motionThreshold && limbSwingAmount != 0; + return averageVelocity >= motionThreshold && limbDistance != 0; } }