Minecraft – Summon fireball going same direction as arrow

minecraft-commandsminecraft-java-edition

A bit of background before I ask the question:

I am making a system of command blocks that finds in arrow in the ground and replaces it with a fireball. Right now I am making the fireball go directly into the ground, but that doesn't work very well when the arrow hits something on the side, as the fireball goes straight down.

Question:

How can I make it so the fireball spawns with a direction the same as the arrow in the ground?

Current Command:

/execute @e[type=Arrow,score_inGround_min=1] ~ ~ ~ summon Fireball ~ ~1 ~ {ExplosionPower:20, direction:[0.0,-10.0,0.0]}

Best Answer

Do

/execute @e[type=Arrow] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0],ExplosionPower:1}

On a timer. It will remove the arrow though.