Fixed animations not being cancelled correctly when their timer ends. Fixes #325

This commit is contained in:
Sollace 2024-04-09 11:37:48 +01:00
parent d5e4b69aec
commit 12748f5c6e
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -535,15 +535,17 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
return;
}
if (animationDuration > 0 && --animationDuration <= 0) {
if (animationDuration <= 0 || --animationDuration <= 0) {
if (animation.renderBothArms() && acrobatics.distanceClimbed > 0) {
return;
}
if (!getAnimation().isOf(Animation.NONE)) {
setAnimation(AnimationInstance.NONE);
}
}
}
private void updateBatPonyAbilities() {
if (ticksSunImmunity > 0) {