The bug
Normally the /clear
command returns how many items it has cleared from a person's inventory. But /clear
does not count the items which were in the player's inventory crafting grid.
To reproduce
Place a command block and put the command
/clear @p
into the command block.Place a button which activates the command block after some time (eg by using repeaters)
Press the button
Open your inventory and put an item into your crafting grid.
Wait for the clear command to run.
Open the command block and see "Previous Output" says no items were found even though it found and cleared your items.
Linked issues
Comments 3
Fixed with MC-172272
Confirmed in 20w19a.