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?
Asked
Active
Viewed 6,920 times
1 Answers
1
Yes:
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
Jason_
- 3,822
- 9
- 25
- 51
/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 05 '16 at 05:49/clearsupports 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 05 '16 at 05:54/clear. Add whatever you want to the/givecommand. – Skylinerw Apr 05 '16 at 06:35