-4

I want to kill a specific item using a command block. If this is possible, how do I do this. Can you kill 2 specific items using a single command block. If yes, how?

I tried killing a gold ingot but it didn't work. Here is the screenshot. SCREENSHOT OF ME TRYING

4
  • Possible duplicate here: gaming.stackexchange.com/q/262777/104387
    – rivermont
    Apr 16, 2016 at 23:24
  • There. I deleted my other post. Apr 16, 2016 at 23:26
  • 6
    Generally, it's not a good idea to delete a question just to reask it. That's seen as shedding downvotes, or bypass a closure. Rather, fix the issues.
    – Frank
    Apr 16, 2016 at 23:32
  • 1
    @EquippedSword99 please don't repost and remove the old post, if no one knows the answer (if the other wasn't answered, then no one knows the answer), they won't magically learn the answer when you repost. Please try adding a bounty next time (once you get enough reputation)
    – ave
    Apr 17, 2016 at 8:43

4 Answers 4

1

The /kill command does not support datatags. Try running the following command:

/scoreboard players tag @e[type=Item] add gold {Item:{id:"minecraft:gold_ingot"}}

Then use:

/kill @e[type=Item,tag=gold]
1
  • 2
    This answer is no longer correct, the one by pppery is. Feb 7, 2020 at 11:22
2

/kill, like all other commands, supports NBT in Minecraft 1.13

/kill @e[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}]
0

In the most recent update of Minecraft, it's as simple as this command: /kill @e[type=item,name="gold ingot"].

0

I play in 1.18.1, and this is the following command that works: /kill @e[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}] Right now, the latest version is 1.18.1, so Idk if it works in later versions.

You must log in to answer this question.

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