Revert "Animations now continue where they should be when players rejoin a world/server."

This reverts commit a5ed14183e.
This commit is contained in:
Luis C.M committed 2024-03-24 18:59:27 -05:00
1 parent a5ed14183e
commit fd4a6d0a2c
7 files changed
+34 -117

No files matched your search

@@ -210,9 +210,6 @@ public class Animation implements IAnimation {
this.whileStanding = compound.getBoolean("WhileStanding");
this.whileMoving = compound.getBoolean("WhileWalking");
this.whileAttacking = compound.getBoolean("WhileAttacking");
this.currentFrame = compound.getInteger("CurrentFrame");
this.currentFrameTime = compound.getInteger("CurrentFrameTime");
}
public NBTTagCompound writeToNBT(){
@@ -234,9 +231,6 @@ public class Animation implements IAnimation {
compound.setBoolean("WhileStanding", whileStanding);
compound.setBoolean("WhileWalking", whileMoving);
compound.setBoolean("WhileAttacking", whileAttacking);
compound.setInteger("CurrentFrame", currentFrame);
compound.setInteger("CurrentFrameTime", currentFrameTime);
return compound;
}
@@ -283,23 +277,16 @@ public class Animation implements IAnimation {
@SideOnly(Side.CLIENT)
public void jumpToCurrentFrame() {
this.jumpToFrameAtTime(this.currentFrame, 0);
this.currentFrameTime = 0;
Frame frame = (Frame) this.currentFrame();
if(frame != null){
for (EnumAnimationPart part : EnumAnimationPart.values()) {
if(part != null){
if (frame.frameParts.containsKey(part)) {
frame.frameParts.get(part).jumpToCurrentFrame();
}
}
}
}
}
@SideOnly(Side.CLIENT)
public void jumpToFrameAtTime(int frameIndex, int time) {
this.currentFrame = frameIndex;
this.currentFrameTime = time;
Frame frame = (Frame) this.currentFrame();
if(frame != null){
for (EnumAnimationPart part : EnumAnimationPart.values()) {
if(part != null){
if (frame.frameParts.containsKey(part)) {
frame.frameParts.get(part).jumpToCurrentFrame();
}
}
}
}
}
}