How to make a fireball shooting sword on vanilla Minecraft?
//ads -- adsterra.com -- native banner
?>
I'm trying to make a command block setup that will spawn a fireball above the player when a specific named sword is used. I'd also like to copy the players direction to the fireball. Finally, I'd also like to add some potion effects. I've got the following commands:
/scoreboard objectives add IsHolding dummy
/scoreboard objectives add InfinityBlade stat.useitem.minecraft.golden_sword
/scoreboard players set @a IsHolding 0
/scoreboard players set @a IsHolding 1 {SelectedItem:{tag:{display:{Name:"Infinity Blade"}}}}
/effect @a[score_IsHolding_min=1] minecraft:regeneration 1 1
/effect @a[score_IsHolding_min=1] minecraft:strength 1 1
/execute @a[score_IsHolding_min=1,score_InfinityBlade_min=1] ~ ~ ~ /summon Fireball ~ ~2 ~
/scoreboard players set @a InfinityBlade 0
The problems are that it's necessary to hit a mob in order to spawn the fireball, and that the fireball doesn't go in the direction that the sword is used.
Pictures about "How to make a fireball shooting sword on vanilla Minecraft?"



How To Make A FireBall Shooting Sword Or Tools In MCPE And MCBE
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Mikhail Nilov, Mikhail Nilov, cottonbro, Yaroslav Shuraev
