// Path: src/main/java/com/leviathanstudio/craftstudio/common/animation/InfoChannel.java
// public abstract class InfoChannel extends Channel
// {
// 
//     public InfoChannel(String channelName) {
//         super(channelName);
//         this.totalFrames = 0;
//     }
// 
//     public InfoChannel(String channelName, float fps, boolean looped) {
//         super(channelName, fps, looped);
//     }
// 
// }


import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.leviathanstudio.craftstudio.common.animation.InfoChannel;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
                if (value.useBoxInOffsets(boxName)) {
                    nextFramePosition = key;
                    nextKeyFrame = value;
                }
            if (key < firstFramePosition && value.useBoxInOffsets(boxName))
                firstFramePosition = key;
        }
        if (nextKeyFrame == null && firstFramePosition < this.totalFrames + 1) {
            this.keyFrames.put(this.totalFrames + firstFramePosition, this.keyFrames.get(firstFramePosition).clone());
            nextKeyFrame = this.keyFrames.get(this.totalFrames + firstFramePosition);
        }

        return nextKeyFrame;
    }

    /**
     * Return the previous stretching KeyFrame before this frame that uses this
     * box, if it exists. If curretFrame is a keyFrame that uses this box, it is
     * returned.
     *
     * @param boxName
     *            The name of the box.
     * @param currentFrame
     *            The current frame.
     * @return The previous key frames.
     */
    public KeyFrame getPreviousStretchKeyFrameForBox(String boxName, float currentFrame) {
        int latestFramePosition = -1;
        int lastFramePosition = -1;
        KeyFrame latestKeyFrame = null;
// Path: src/main/java/com/leviathanstudio/craftstudio/common/animation/InfoChannel.java
// public abstract class InfoChannel extends Channel
// {
// 
//     public InfoChannel(String channelName) {
//         super(channelName);
//         this.totalFrames = 0;
//     }
// 
//     public InfoChannel(String channelName, float fps, boolean looped) {
//         super(channelName, fps, looped);
//     }
// 
// }


// Path: src/main/java/com/leviathanstudio/craftstudio/client/animation/ClientChannel.java
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.leviathanstudio.craftstudio.common.animation.InfoChannel;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

                if (value.useBoxInOffsets(boxName)) {
                    nextFramePosition = key;
                    nextKeyFrame = value;
                }
            if (key < firstFramePosition && value.useBoxInOffsets(boxName))
                firstFramePosition = key;
        }
        if (nextKeyFrame == null && firstFramePosition < this.totalFrames + 1) {
            this.keyFrames.put(this.totalFrames + firstFramePosition, this.keyFrames.get(firstFramePosition).clone());
            nextKeyFrame = this.keyFrames.get(this.totalFrames + firstFramePosition);
        }

        return nextKeyFrame;
    }

    /**
     * Return the previous stretching KeyFrame before this frame that uses this
     * box, if it exists. If curretFrame is a keyFrame that uses this box, it is
     * returned.
     *
     * @param boxName
     *            The name of the box.
     * @param currentFrame
     *            The current frame.
     * @return The previous key frames.
     */
    public KeyFrame getPreviousStretchKeyFrameForBox(String boxName, float currentFrame) {
        int latestFramePosition = -1;
        int lastFramePosition = -1;
        KeyFrame latestKeyFrame = null;
        for (final Map.Entry<Integer, KeyFrame> entry : this.keyFrames.entrySet()) {