-
Bug
-
Resolution: Works As Intended
-
None
-
Minecraft 15w34d, Minecraft 15w45a
-
Confirmed
Introduction
I know that it is intended that one chain can not infinitely run itself over and over again in one tick. This report is not about this fact but rather about a problem which is caused indirectly by the way the "loop problem" is solved.
This report is somehow also about resource saving map making.
Problem
Imagine you have two different chains both doing something different but triggering the same command at the end.
Here is an example:
CCB | CCB3 | CCB |
CCB1 | CCB2 |
Key:
- CCB: chain command block without command
- CCB#: chain command block with command
CCB1: /scoreboard players set @p[name=Notch] test 1
CCB2: /scoreboard players set @p[name=Dinnerbone] test 2
CCB3: /say @a[score_test_min=1]
Chains:
- CCB1 -> CCB -> CCB3
- CCB2 -> CCB -> CCB3
I know this example is pretty simple but it shows that this would need only 3 command blocks. However at the moment this is not possible and you would need two seperate chains both containing one exact command: /say @a[score_test_min=1] (CCB3).
On a large scale this has really a great impact and saves a lot of command blocks.
Possible solution
Currently there is probably a list containing all scheduled command blocks and then the game does this:
- Start chain
- Test if next chain member is not in scheduled command blocks list
- If true continue with step 3
- If false continue with step 2
- Schedule this chain command block for this tick
- Add command block to scheduled command blocks list
- Continue step 2 until chain finishes
- Continue step 1 until all impulse and repeating command blocks were executed
And now a possible solution:
- Start chain
- Test if next chain member is not in scheduled command blocks list
- If true continue with step 3
- If false continue with step 2
- Schedule this chain command block for this tick
- Add command block to scheduled command blocks list
- Continue step 2 until chain finishes
- Clear sheduled command blocks list
- Continue step 1 until all impulse and repeating command blocks were executed
- is duplicated by
-
MC-93385 When two chains of command block are merged, rest of chain is executed only once
- Resolved