Can I testfor shot arrows and then make them explode?
Good would be if this would work only for player-shot arrows. Or, even better, could I do that when anybody shoots the arrow from a specific bow (somehow named or with another NBT tag), it explodes?
01 Answer
Yes, you can. Here's how:
Execute this command:
/scoreboard objectives add selector dummyGive yourself a Power 6 and Infinity (optional) bow (impossible to get in survival) and an arrow:
/give @p minecraft:bow 1 0 {ench:[{id:48,lvl:6}, {id:51, lvl:1}]} /give @p minecraft:arrow 1Power a Repeating Command Block with this command:
/scoreboard players add @e[type=Arrow] selector 1 {damage:5.5d,inGround:1b}This will select all arrows fired from a power 6 bow (with damage 5.5) that are in the ground.
Next to the last Command Block place two Chain Command Blocks (in a row) - with a Fireball summon command and arrow killing command (at the edge):
/execute @e[type=Arrow,score_selector_min=1] ~ ~ ~ /summon Fireball ~ ~ ~ {direction:[0.0,-9.0,0.0],ExplosionPower:15} /kill @e[type=Arrow,score_selector_min=1]Go shoot your bow out! Good luck!
P.S. If it lags your Minecraft, lower the ExplosionPower value.