Im currently able to detect an item in a players inventory and it is only active if the player is holding it while pressing the button that activates the chosen item. But I've been trying to get a chained, conditional, Always active block after it to remove the item after pressing the button. Is it possible to do so?



By using the /clear command you can clear an item from a players inventory /clear @p <or> (playername) (item name) For an example /clear @p minecraft:dirt

  • The issue with this is that the item is very specific, the command i used to summon it is /give @p beetroot 1 0 {display:{Name:"Heart of Asmodeus" Lore:["Heart of the Ruler of the Fire Plane.","It is said to have been taken by the Archangel Gallaldriel."]},HideFlags:6,Unbreakable:1} Will that effect this at all? – Merced Flores Apr 5 '16 at 5:49
  • @MercedFlores Yes, /clear supports dataTags. You can check the wiki for command syntax. However, I recommend you to use custom NBT data instead of trying to detect every single tag on the item for simplification (e.g. /give @p stone 1 0 {specialStone:1b,display:{Name:"Test"}} with /clear @p stone -1 -1 {specialStone:1b}). – Skylinerw Apr 5 '16 at 5:54
  • So is there no way to keep the Lore on the Item? And is it possible to give it an enchantment so it has a glowing effect? – Merced Flores Apr 5 '16 at 6:02
  • @MercedFlores The "specialStone" tag just represents all the data as a whole so you don't have to retype it all in /clear. Add whatever you want to the /give command. – Skylinerw Apr 5 '16 at 6:35

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