User:Crec0/sandbox/Chunk format/Arrow


 * 1 or 0 (true/false) - Whether the arrow deals critical damage.
 * Raw damage of the arrow. This damage is scaled by other factors like velocity before being inflicted on the target. Check damage tag for more details on how this raw damage is calculated.
 * Optional. The block the arrow is in.
 * The resource location corresponding to the block.
 * Optional. The block states of the block.
 * The block state name and its value.
 * 1 or 0 (true/false) - Whether the arrow is stuck in the ground.
 * Increments each tick when the arrow is not moving; resets to 0 if it moves. When it ticks to 1200, the arrow despawns.
 * 0 = cannot be picked up by players. 1 = can be picked up by players in survival or creative. 2 = can be picked up by players only in creative.
 * The amount of remaining times this arrow can pierce through an entity.
 * Ticks until the arrow can be picked up by players. This is set to 7 when the arrow initially hits a block.
 * 1 or 0 (true/false) - Whether the arrow was shot from a crossbow. If inGround is true, this is always set to 0.
 * The sound event to play when hitting a block/mob, cannot use non-vanilla sound events.

Player
Default damage value of an arrow shot from a bow without power enchantment is 2.0. If the bow is enchanted with power, a flat 0.5 is added. On top of this, a 0.5 damage is added per level of enchantment.

The damage calculation when bow is enchanted with power is defined by $$\text{damage} = \begin{cases} 2.0 & \text{without power enchantment} \\ 2.0 + 0.5 + 0.5 * \text{PowerLevel} & \text{with power enchantment} \end{cases} $$

Mobs
Bow wielding entities however difficulty level and randomness involved in their damage claculation.

Formula for claculating raw damage of the arrow shot by a mob $$\text{damage} = \begin{cases} 2.0 + 0.11 * \text{difficulty} + 0.57425 * T[-1, 1] & \text{without power enchantment} \\ 2.0 + 0.11 * \text{difficulty} + 0.57425 * T[-1, 1] + 0.5 * \text{powerLevel} + 0.5 & \text{with power enchantment} \\ \\ \text {Where } T[-1, 1] \text{ is standard triangular distribution range} \end{cases}

$$