Models in Minecraft are hard-coded. There is no notion of block hierarchy (only a list of blocks). This means animations are either done procedurally (in a very basic way) or hard-coded values with interpolation.
There are a few editors for Minecraft models like Techne or FMCModeler which allow importing / exporting Minecraft model code for mods, but they don't support animations since it is probably handled differently for each model.
Here's a quick sample generated with FMCModeler:
//variables init:
public ModelRenderer box;
//constructor:
box = new ModelRenderer(0, 0);
box.addBox(0F, 0F, 0F, 16, 16, 16);
//render:
box.render(f5);
A better way to do it would be to build a full block-based modeler with some notions of block hierarchy so you can animate the models with keyframes and interpolation.
I'm currently building a multiplayer game building tool which does just that (among other things, http://craftstud.io/). It already allows building complex static textured models and more is on the way.
Here's a complex model built with CraftStudio As you can see, the blocks are arranged in a tree on the right:
Each block is serialized to disk / over the network with the following data:
- Unique ID
- Parent node ID
- Position (affects descendants)
- Scale (affects descendants)
- Angle (affects descendants)
- Offset from pivot point
- Block Size
- Block texture offset (UV coordinates offset for the texturing)
I plan on adding animation support by storing a map with animation names as key and a list of keyframes as value. Each keyframe will be associated with a block and a value to animate. Between keyframes, values should be interpolated (either linearly for position or spherically for angles, search for lerp and slerp).