Sometimes Using the /clear command to clear a set amount of items from a player's inventory will clear the item from the players inventory even though the player doesn't have the correct amount of items in their inventory.
Comments 6
This command issue will occur no matter if you use commands in chat or command blocks the full command is /clear @p (any item name here) 0 3 but it will execute no matter if the player has only 2 of the same items in there inventory when it should only execute /clear on the players inventory when the player has 3 or more of the same item in the inventory.
I think it is because you put 3 as tge amount to be cleared. That command clears out the amount you set. 3 is then considered as the maximum amount to be cleared, not the minimum. I think this is WAI.
I don't think it is because it clears the correct amount no more or no less from the player but then it doesn't.
Could provide a video instead?
I'm really confused now. You said you set 3 to be cleared, correct? But you had 2 and it still cleared those items. 3 will be the maximum amount cleared meaning a maximum of 3 items will be removed even if there is only 1 or 2 items of the mentioned item but it should not clear more than 3; which suggests it worked fine.
Cleaning up old tickets: This ticket has not been updated recently (~1 year+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Please be specific. What is the exact command? What does the inventory look like before and after? How did you expect it to be different? How is the command being executed - by a player or by a command block? What game mode are you in?
Please review the Issue Guidelines for an explanation of what to include in a report.