Clear 1 Item in a player's inventory

Clear 1 Item in a player's inventory - Top view of metal pendulum device placed on white table in psychiatrical clinic

I added a command block which tests if a player has a gold_nugget, followed by a comparator. That comparator leads to a command block which gives you 1 ladder, and also to another command block which clears 1 gold_nugget. But it won't clear it.

The command I used:

/clear @p minecraft:gold_nugget 1


Best Answer

/clear's syntax:

/clear <player> [id] [Damage] [maximum amount] {dataTags}

You have the "1" stated as the "Damage". You'll need to shift it over by specifying the "Damage" (which would be 0 for gold nuggets):

/clear @p minecraft:gold_nugget 0 1



Pictures about "Clear 1 Item in a player's inventory"

Clear 1 Item in a player's inventory - Interior of modern kitchen in office
Clear 1 Item in a player's inventory - Blackboard surrounded with cones and pebbles
Clear 1 Item in a player's inventory - Aerial Photography of Rocks Beside Body of Water



How do you remove one item from your inventory in Minecraft?

How to Enter the Command
  • Open the Chat Window. The easiest way to run a command in Minecraft is within the chat window.
  • Type the Command. In this example, we will remove all items from your inventory with the following command: /clear. Once the cheat has been entered, your inventory will be cleared:




  • Minecraft 1.16.5: How to remove certain items from a players inventory




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Skylar Kang, Max Vakhtbovych, Brett Sayles, Luciann Photography