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.
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.
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]
/kill
, like all other commands, supports NBT in Minecraft 1.13
/kill @e[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}]
In the most recent update of Minecraft, it's as simple as this command: /kill @e[type=item,name="gold ingot"]
.
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.