1

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?

0

1 Answer 1

2

Yes, you can. Here's how:

  1. Execute this command:

    /scoreboard objectives add selector dummy
    
  2. Give 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 1
    
  3. Power 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.

  4. 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]
    
  5. Go shoot your bow out! Good luck!

P.S. If it lags your Minecraft, lower the ExplosionPower value.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .