I'm playing Hexxit-Modpack, and the Minecraft version is 1.5.2. I want to build a small shop, and for this I need a clear command. I found some on the Internet, but nothing works for me.

I just want a piece of an item to be cleared and not the whole stack. Maybe you guys know too if it is possible to ask if the player has the item in the inventory.

  • What exactly did you find that didn't work? Please share it with us - that way we have a base to work off of! Dec 16, 2020 at 4:02
  • Please don't rollback unless you believe the old version is better.
    – Penguin
    Feb 8, 2021 at 6:33
  • 1
    Please don't vandalize your own posts. When you post here, you give SO the right to distribute the content under CC-by SA 4.0. Any vandalism will be reverted.
    – greg-449
    Nov 27 at 12:58

1 Answer 1


Clear Command was Introduced in 1.4.2


/clear [player] [item] [data] [maxCount] [dataTag]

So for your example to clear 1 piece of stone:

/clear @p 1 0 1
  • Works not for me. The whole stack get cleared. Dec 17, 2020 at 10:13
  • @DenisJurkovsek you gotta change the first 0 to your item ID. What exact command did you use or did you try to use the example?
    – Penguin
    Dec 17, 2020 at 15:10
  • I used it for stone in my example. /clear @p 1 0 1 Dec 18, 2020 at 17:16

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