mojira.dev
MC-89220

Buggy conditionality when command blocks are updated within a tick

If you have 2 impulse command blocks set up in the following manner:
[>][>]
1st, Impulse: testfor Fails
2nd, Impulse, Conditional: say $
And activate them within the same tick using a fill clock, the first one fails and the last one does nothing, as expected.
If you then change the first block to testfor @a and activate them again within the same tick, the first succeeds and the last one DOES NOT execute, even though the first one succeeded.

I have now shown this to be a SuccessCount problem. When a block's command is changed, SuccessCount is reset to 0. If this tag is manually reset to its previous state when the command is changed, this now fails whenever SuccessCount updates, which is any time the checked condition does.

Other notes:

  • Having a repeat command block for the second one produces the aforementioned effect, but a chain command block works properly.

  • I tested whether it was a block data problem, and the SuccessCount tag is updated. This is a SuccessCount problem! While the tag is updated (as can be checked using /blockdata during the tick), it's not performed fast enough for command blocks to check properly.

This is a real pain for high - speed efficient circuits (in fact, I have a similar setup to the one mentioned above switching over 50 command blocks), so please do fix soon.

Linked issues

Attachments

Comments 30

that has to do with the order of execution, it first runs the conditional then the testfor because of the set up, if you want then to activate in the certain order, use chain command blocks

Invalid according to FVBico's comment.

Sorry, forgot to mention that. I set these up in the correct execution order (-X > +X) and it still didn't work properly.

Like I said, use chain command blocks

Can't use chain command blocks if I need the second one to switch a chain based on the condition of the first one. Believe me, if there was a way around it, I would be using it.

20 more comments

This should definitely be fixed, as it is a useful technique and fits perfectly with the 1.9 command block philosophy.
I’m working on a command block server, and being able to switch impulse and repeat blocks at high speed using the conditionality flag would really improve the systems.

This is not a discussion forum. If you believe this ticket needs to be reopened you can make your case in a concise post on http://mojira.reddit.com

About: "The order of execution should be defined by the redstone update order (and, with powered blocks & fill, this is well-defined), which means that it is guaranteed."
The update order (XYZ) was never well defined. It is coincidence that this order remained the same and could change at any time if a different update order has advantages over the current one. It's the main reason chain command blocks were introduced to have a defined order of execution.

The current behavior of command blocks and the conditional flag is exactly how it needs to work. Different ways to handle ticking and conditional flags have been tested and this proved to be the most consistent. Chain blocks are the way to execute commands in a defined order.

And as redstonehelper just said, this is not a discussion forum.

Yeah, put something on the reddit after redstonehelper said that. In this case, hell, things are going to get annoying concerning multiple updating lines.

In 1.12 /fill, /setblock and /blockdata work instant but conditional repeating command blocks and normal command block have a delay.

Ozone Smith

michael

Confirmed

block-update, command_block, conditional

Minecraft 15w39a, Minecraft 15w39c, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47c, Minecraft 15w50a

Retrieved