Minecraft – How long does it take to fully draw a bow in Minecraft

minecraft-java-edition

Exactly how long does it take to fully draw back a bow? (No approximations; there's already a forum post stating that it is about 1200 milliseconds after testing, but I would like to know the actual time it takes.)

Best Answer

Here is decompiled source code snippet for minecraft 1.8.8 avaliable through Mod Coder Pack:

 int i = this.getMaxItemUseDuration(stack) - timeLeft;
 float f = (float)i / 20.0F;
 f = (f * f + f * 2.0F) / 3.0F;
 if ((double)f < 0.1D)
 {
     return;
 }
 if (f > 1.0F)
 {
     f = 1.0F;
 }
 EntityArrow entityarrow = new EntityArrow(worldIn, playerIn, f * 2.0F);
 if (f == 1.0F)
 {
     entityarrow.setIsCritical(true);
 }

Minecraft simulates everything by recalculating positions/input/etc. 20 times per second. One such recalculation is called a tick.

this.getMaxItemUseDuration(stack) - timeLeft; yields amount of ticks item was used or how many ticks passed with button held. Next line transforms number of ticks to number of seconds and next calculates potential damage. By solving school grade math, we can find the maximum value which happens at i = 20 or bow used for 20 ticks.

In addition, we should take into account, that tick when button release is registered is not counted, so we need to add one tick to compensate; and that floating point math impreciseness will make comparison f == 1.0F likely to fail if we wait exactly 20 ticks, so we want f > 1.0F to trigger before that, +1 tick.

In the end, to fully charge bow you will need exactly 22 ticks or 22/20 = 1.1 second.

However, as your initial press might happen anywhere between two ticks (your input will not register until tick happens), and that ticks are not guaranteed to be distributed exactly evenly because of lag, some delays can occur. I would expect it to not be larger than one tick, so final expected time is 1.125±0.025 seconds