Fixed animation interpolation not working after animations are stopped.

This commit is contained in:
Luis C.M committed 2024-02-19 18:24:39 -06:00
1 parent f84b16b29a
commit fd7412148d
2 files changed
+13 -15

No files matched your search

@@ -153,7 +153,7 @@ public class AnimationData implements IAnimationData {
} else {
Animation newAnim = new Animation();
newAnim.readFromNBT(((Animation) animation).writeToNBT());
if (this.animation != null && newAnim.frames.size() > 0) {
if (this.isActive() && !newAnim.frames.isEmpty()) {
Frame frame = (Frame) this.animation.currentFrame();
if (frame != null) {
Frame firstFrame = newAnim.frames.get(0);