TransWikia.com

How to execute a specific item in minecraft

Arqade Asked by Mohannad El-Nesr on May 25, 2021

I want to make a command executing a tripwire hook when it is thrown in the ground you summon a lighting bolt but it seems you can’t add NBT tags in an execute command so how to specify the item I want

2 Answers

you cannot do it using execute only you must use scoreboard as in the following:

/scoreboard players set @e[type=item] Lightning 1 {Item:{id:"minecraft:tripwire_hook",Damage:0s,Count:1b,tag:{display:{Name:"Lightninger",Lore:[]}}}}

then

/execute @e[score_Lightning_min=1] ~ ~ ~ summon Lightning_Bolt

Correct answer by Mohannad El-Nesr on May 25, 2021

Minecraft 1.13 merged NBT tags into the selector syntax, making this easy:

/execute as @e[type=item,nbt={Item:{id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:""Lightninger"",Lore:[]}}}] run summon lightning_bolt

Answered by pppery on May 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP