Minecraft wiki entry for Firework_Rocket, associated text: When spawned, fireworks have a vertical speed of .05 and a random small X and Z speed (random value near zero with a standard deviation of .001). Each firework also determines its lifetime in ticks by 10 × (number of gunpowder + 1) + random value from 0 to 5 + random value from 0 to 6, after which it explodes. Each tick, the firework accelerates horizontally by multiplying its X and Z velocities by 1.15, and vertically by adding a constant factor of .04.