boolean trackReplaced = false; for (Track track : animation.getTracks()) { if (((BoneTrack) track).getTargetBoneIndex() == trackEntry.getKey().intValue()) { animation.removeTrack(track); animation.addTrack(newTrack);
if (track instanceof BoneTrack) { BoneTrack boneTrack = (BoneTrack) track; int index = boneTrack.getTargetBoneIndex(); Bone bone = skeleton.getBone(index); Joint joint = joints[index];