Skip to content

Commit

Permalink
Fix AnimationUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed Mar 29, 2024
1 parent e75bad1 commit 9d138d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 9d138d6

Please sign in to comment.