Updated for 1.21.8.
Made it work in Survival mode! (This was harder (and more annoying) than it sounds... I need to target the ender pearl entity with custom data, rather than the player holding the item with custom data.)
Moved functions to their own namespace to prevent collisions.
Using my newfound knowledge of how to create custom (ish) items with datapacks, we can now give the player a custom "Shoot Fireball" item when they are riding a happy ghast!
(To avoid extra scoreboards, I decided to make the item a retextured ender pearl, because it's easy to detect when the player throws a pearl.)
Updated for 1.21.7!
Made it so it works with multiple players (using a scoreboard for the cooldown).
Also, fixed a bug where if you were too far from the origin, the temporary marker entities would be unloaded and the fireball would fall to the ground.
Hold a Fire Charge in your hand while riding a Happy Ghast to shoot fireballs.



