mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 06:07:27 +00:00
Fixed animations not transitioning correctly when updating from a looping animation.
This commit is contained in:
1 parent
963393b7fe
commit
a07a33c068
2 files changed
+6
-3
No files matched your search
@@ -264,10 +264,13 @@ public class AnimationData implements IAnimationData {
|
||||
CommonProxy.clientPlayingAnimations.add(newAnim);
|
||||
}
|
||||
}
|
||||
|
||||
Animation prevAnim = this.animation;
|
||||
this.animation = newAnim;
|
||||
|
||||
if (this.isActive() && newAnim != null && !newAnim.frames.isEmpty()) {
|
||||
Frame frame = (Frame) this.animation.currentFrame();
|
||||
if (this.getMCEntity() != null && this.getMCEntity().worldObj.isRemote &&
|
||||
this.isActive() && prevAnim != null && newAnim != null && !newAnim.frames.isEmpty()) {
|
||||
Frame frame = (Frame) prevAnim.currentFrame();
|
||||
if (frame != null) {
|
||||
Frame firstFrame = newAnim.frames.get(0);
|
||||
for (Map.Entry<EnumAnimationPart, FramePart> entry : frame.frameParts.entrySet()) {
|
||||
|
||||
Reference in new issue
Block a user