Detecting tagged arrows in ground
I’m trying to make a grenade for a mini game Using these commands
/give @p minecraft:bow{grenade:1,Damage:382,display:{Name:”\”Grenade\””}}
That would give the player a 2 durability bow
/replaceitem entity @a[nbt={SelectedItem:{tag:{grenade:1}} weapon.offhand minecraft:tipped_arrow{grenader:1,CustomPotionColor:123456,display:{Name :”\”Grenade\””}}
This gives the player holding the bow a specific arrow.
/execute at @a[nbt={SelectedItem:{tag:{grenade:1}}}] at @e[type=arrow,nbt={inGround:1b},sort=nearest,limit=1] run summon ........
This works great for spawning entities at the arrow shot until multiple players are involved. How would I make it so that only the arrows given when holding the bow are affected by this command, and not just any old arrow on the ground?
Posted Dec 1, 2019, 1:55 PM UTC