When attaching a comparator to a command block which has the command "/clear <player> <item id>", the comparator will return true, even if the item in question is not removed from the players inventory.
I expected it to not output a redstone signal at all if there were no items removed. However it appears that the only way for that to happen is for that player to not exist on the server
Linked issues
is duplicated by 1
Comments 5
It should then only output the number of players it does change then, shouldn't it?
I mean, personally, here's how I think the scenario would go around if it were actual people.
You got 5 people, 3 of whom have various amounts of apples.
The admin says, "I'm going to take everyone's apples" and proceeds to do so.
He takes apples from the three who have them, therefore succeeding.
He cannot take apples from the other two, because they do not have any, therefore a fail.
Seems I was partially mistaken. Any command successfully executed will output a signal. If the command was /testfor, the signal strength will be based on the number of players it found. The command /clear therefore works as intended.
It seems they no longer function this way, but rather the way you had originally thought it should. I've done tests with this, and it only outputs a signal if the item is cleared. This is why I opened a separate issue; the enchant command outputs a signal if no item is enchanted. Why is inconsistant command block behavior not considered a bug? This issue has been resolved, and works just like the original poster thought it should. My issue has not been resolved, and thus should not have been flagged as a duplicate, unless there is some command block behavior I'm simply not understanding.
The signal strength is based on the number of players on which the command is used, regardless if the command makes any changes.