Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event.isMoving() not detected on block that sink you a littlebit. #680

Closed
MalfuXT opened this issue Feb 17, 2025 · 2 comments
Closed

event.isMoving() not detected on block that sink you a littlebit. #680

MalfuXT opened this issue Feb 17, 2025 · 2 comments

Comments

@MalfuXT
Copy link

MalfuXT commented Feb 17, 2025

i test it on my mob and antique beasts mod.
if they walk on soul sand and honey block. mob will detect it as idle somehow.

private PlayState predicate(AnimationState event) {
if (event.isMoving()) {
event.getController().setAnimation(RawAnimation.begin().then("walk", Animation.LoopType.LOOP));
} else {
event.getController().setAnimation(RawAnimation.begin().then("idle", Animation.LoopType.LOOP));
}
return PlayState.CONTINUE;
}

that is the code that i use for moving and idle.

i'm on geckolib 4.7 and minecraft fabric 1.20.1.

please let me know if its just happen for me, or happen to anyone else, maybe something to fix.

@Tslat
Copy link
Collaborator

Tslat commented Feb 17, 2025

Might need to adjust the movement threshold maybe in your renderer getMotionAnimThreshold

@Tslat Tslat closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2025
@MalfuXT
Copy link
Author

MalfuXT commented Feb 17, 2025

thank you!!

so to make it work i put it in Renderer

like this.

Override
public float getMotionAnimThreshold(ArcherEntity animatable) {
return 0.008F; // Adjust this value as needed, default is 0.015F
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants