How To Make Bow / Snowball that shoots Custom Named Arrows / Snowballs

Snowballs are a lot of fun aren't they? Well, this is simpler, since your requirements are that a particular sort of snowball will have an arc of lightning bolts across its trajectory, but the principal is the same.

For this, I used a series of 4 commands and 1 setup command. (well, and also /gamerule commandBlockOutput false) It works by setting a lightning score for snowball entities holding customly named snowballs, and then summoning a lightningbolt at each of those snowballs. And it's actually a neat little set of commands.

First, we need our scoreboard. You can set one up using /scoreboard objectives add lightning dummy. From here, we want to be able to perform commands on players holding customly named snowballs:

scoreboard players set @a lightning 1 {SelectedItem:{id:minecraft:snowball,tag:{display:{Name:"KABOOM"}}}}

Unfortunately there's no really clean way to invert this sort of command to reset this score, and resetting it for all items would also cause the last snowball in a stack to stop working, so I just reset it for players holding snowballs. As long as the commands execute at the same time, you shouldn't run into any problems, unless you're trying to build a PvP game around this, then you may want to reset this score for everyone just to be safe:

scoreboard players set @a lightning 0 {SelectedItem:{id:minecraft:snowball}}

From here, we can set the score of the snowball entities near these players using execute:

execute @a[score_lightning_min=1] ~ ~ ~ scoreboard players add @e[type=Snowball,r=10] lightning 0

Now you have a marked snowball. Just what we need! The final step to this equation is to slap a score_lightning_min=0 in the original "make lightning at every snowball entity" command, hook all 4 command blocks up to a clock of some sort (I recommend a /fill clock, but it's not entirely necessary as long as all of your commands are on the same line of redstone) and we should be set:

execute @e[type=Snowball,score_lightning_min=0] ~ ~ ~ summon LightningBolt ~ ~ ~

The results: Wholly satisfying:

enter image description here


It is possible to name arrows or snowballs. However, any arrow shot from a bow will spawn a default arrow entity, and any snowball thrown by a player will spawn the default snowball entity. Currently there is no way to change this, but there are a few workarounds if you're doing something specific.

1.) You can tag only snowballs/arrows that are in a certain area around certain players. For instance, you could make a character class called the 'Archer' with scoreboard commands. and you could make all the arrows that this class fires have some special effect by tagging all the arrows that travel very close to 'Archer' players.

2.) You can tag only snowballs/arrows that are travelling certain speeds, heights, or directions with minecraft's new /scorebord players tag command (this will only work in the snapshots). You may also be able to tag only arrows that are on fire (but this depends on whether or not arrows use the {Fire:x} NBT tag.

3.) If players are not going to be throwing the special snowballs/arrows (e.g. you are only summoning them) it is easy enough to just summon arrows/snowballs with names.

4.) This one only applies to arrows. In the most recent snapshots Mojang has added new arrow types that involve 2 new entities. Spectral arrows and arrows with potion effects both have their own unique entities so you could modify what these arrows do without affecting default arrows (although this method would affect ALL spectral arrows and/or ALL tipped arrows.

If one of these methods sounds like it would help you reply to this comment and I will elaborate said method (writing out 4 tutorials is a bit too much sorry).


Just put this on a Command block on a super fast clock

/Kill @e[type=Snowball]

Then another command block with this in it:

/execute @e[type=Snowball] ~ ~ ~ /summon Arrow {CustomName:"(Name)"}

There you go and just copy and paste these commands in Minecraft.


How to get command block:

/give @p minecraft:command_block

How to copy and paste:

  1. Highlight the command you want to copy

  2. Open up the command block

  3. Press CTRL+v at the same time


How to make clock:

/fill ~ ~1 ~ ~ ~1  ~ minecraft:air

Then another command block 2 blocks above that with the command:

/fill ~ ~-1 ~ ~ ~-1 ~ minecraft:redstone_block

Yay you did it whooooooo!