2

This question is an exact duplicate of:

I want to create a command block with the command

/clear @a[r=5,m=0] 570

(Yes, it is an ID from a mod, but it does not matter anything). I want to detect when this command has succeeded using comparator facing from the command block.

So, everything works good, but the comparator after that is always outputting. How to make it stop outputtng, so the command success can be detected several times?

I tried to hook up the command block with /blockdata ~ ~ ~2 {SuccessCount:0} where the coordinates point at the first command block, but this didnt work.

I'm running Minecraft 1.7.10.

marked as duplicate by Dragonrage, Virusbomb, dly, Gigazelle, Tim S. Jun 26 at 20:48

This question was marked as an exact duplicate of an existing question.

  • I just use redstone to take output to a latch with a timed reset. Comparator stays on, but output from latch doesn't. When comparator resigns, the latch is triggered again. This bugged me for a while too. There are other ways to achieve this. – ydobonebi Aug 6 '15 at 17:13
2

Command blocks only update when a redstone current is being applied to it. For example, if someone wanted to update the output every 5 seconds, they would put a 5-second clock running into it. To update when a player clicks a button, just wire up the button to the command block.

See here for a fast clock you can use to update it almost instantly after change.

  • While that is true, it is not really an option for running a \clear command, since you might not want to risk clearing someone's inventory again. – MrLemon Mar 30 '15 at 13:01
1

When I just ran /blockdata 1014 56 992 {SuccessCount:0}, the block I was targeting stopped outputting. However, if this is not working for you, you might try adding TrackOutput:0b

/blockdata 1014 56 992 {SuccessCount:0,TrackOutput:0b}

Not the answer you're looking for? Browse other questions tagged or ask your own question.