Commands in the form /execute testforblock do not update comparators correctly
i.e, suppose you wanted to check whether the nearest player was standing on grass or not. One way that would make sense would be a command block with the command "/execute @p ~ ~ ~ testforblock ~ ~-1 ~ grass". However, any comparators sticking out of a command block will be powered no matter what: the game only checks whether the execute command succeeds, not the testforblock.
Environment
irrelevant
Linked Issues
is duplicated by4
Created Issue:
Commands in the form /execute testforblock do not update comparators correctly
i.e, suppose you wanted to check whether the nearest player was standing on grass or not. One way that would make sense would be a command block with the command "/execute @p ~ ~ ~ testforblock ~ ~-1 ~ grass". However, any comparators sticking out of a command block will be powered no matter what: the game only checks whether the execute command succeeds, not the testforblock.
Environment
irrelevant
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
whoops, looks like this is a duplicate of MC-48449. That one says "fixed" but nothing about comparators reacting to the command being executed. Hope that's what the fix means... anyway, if a mod could resolve this it'd be great.
This ticket is looking related to MC-48449, the issue is not Fill and Setblock commands not functioning correctly it's more Execute fill does not update comparator output
@Isaac King: see MC-48449 which details that /execute works differently than that. The issue here is the incorrect signal strength as a result of the fix for the other bug report.
Oh. In that case, isn't this a dupe of MC-48449?
They cover two different things, though of a related topic (so "related" rather than "duplicate"). MC-48449 covers /execute even providing an output from the command it had run to begin with, while this one covers the signal strength of the way /execute outputs after MC-48449 was resolved. This report couldn't have been made without MC-48449 being resolved.
EDIT: Fixed links, thanks Marcono1234.
There is also a problem using /execute testfor. I had this command on a clock:
/execute @e[type=Zombie] ~ ~ ~ testfor @a[r=10]
but even if I was out of range, as long as there was a zombie in the world, the comparator always outputted