-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

  • Possible duplicate here: gaming.stackexchange.com/q/262777/104387 – rivermont - Will B. Apr 16 '16 at 23:24
  • There. I deleted my other post. – EquippedSword99 Apr 16 '16 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 '16 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 '16 at 8:43
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]
| improve this answer | |
  • 2
    This answer is no longer correct, the one by pppery is. – Fabian Röling Feb 7 at 11:22
1

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

/kill @e[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.