Procedural animated texture generation/Gears

Code which generates the frames of the gear texture can be found here.
The animation for gears was generated using two predefined image files - for the rotating gear and for the stationary center.
Gear (texture) JE1.png|
Gear (middle texture) JE1.png|
The animation, updated every game tick,https://github.com/NeRdTheNed/MC-TextureGen/releases/tag/v1.2.0 is rendered as a 16×16 texture like most other blocks. The resulting gear has 18.75 RPM.
There are two different animations used for gears - one for clockwise rotation, and another for anticlockwise rotation, to allow for logical meshing. These are generated effectively identically, with the only difference being the direction of rotation; both start on the same frame, but cycle through them in the opposite direction.
Gear 0 (texture) JE1-a1.gif|Clockwise rotation
Gear 1 (texture) JE1-a1.gif|Anticlockwise rotation
Category:Textures