When I was converting my command block modules to 1.9, I realized that the execution of a chain of commands blocks does not always finished in one tick. The delay-in-ticks grows as the length of chain increases. According to what Searge described in the MC-86960 issue, A scheduled chain of commands block should always be executed in the same tick, but it is actually not the case.
Here are the steps I took to experiment on this issue, you can reproduce it in similar ways.
1. First I placed a repeating command block, and connected it with a chain consists of 1200 chain command blocks (with auto = true)
2. For the 400th, 800th, and 1200th block in the chain, I entered "/say checkpoint 1", "/say checkpoint 2", and "/say end point" in them.
3. Entered "testfor @a" for all the other command blocks in the chain.
4. Then I place another repeating command block as an independent chain, entered "/me tick".
5. Finally, turn off command output, and activate the two repeating chains and see chat messages for the result.
There is a screenshot in attachment file to show you the result I got.
If this is intended, please tell me the reason and what should I do if I want to make sure all commands in a chain are executed in the exact same tick. Thank you.
Linked issues
relates to 3
Attachments
Comments 12
Relates or Dupes MC-86960?
reply to Jacob Dodson:
I don't know where you get that information from, but it's incorrect. a chain command block only cares about the block behind it when it is conditional. The chain will always go to the block it is pointing to. The setup of my example will go through each of the blooks correctly, just that it won't travel to the end in one tick.
Confirmed for 1.9-pre2
I used 1000 command blocks with /say [number of cb] every 100 command blocks and /testfor @a in the other. 1000th command block didn't execute sometimes.
Edit: with 1200 cb the chain stops between 700 and 1200
The more I test it the more it seems like a limitation of what the software can do.
I did an experiment with 4096 commandblocks, I built them all in the same 16x16x16 Chunk just to make sure it's not an issue with it chaining between chunks and I'm getting one tick that chains through all of them, and two other ticks that chains only through about 1/8th of the way till the next tick starts, this happens consistently at a rate of two ticks that don't chain all the way and one tick that does, every 3rd tick goes through all of them.
Here's a log that shows this behavior.
http://pastebin.com/zi1dFCKG
Probably this bug can affect also short chains of command block: MC-98587
When the 1.9.1 pre-release is available, please let me know here if this is still an issue in that version. I think I may have found the cause but don't have a good test case to reproduce it.
This seem fixed in 1.9.1-pre1. Although this may still happen with an even larger amount of command blocks ( > 60000), but that would be WAI at this point.
May you please stop over bumping the post? people will see yours soon, be patient please.