Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-87122

Chain command blocks can not be triggered twice from seperate chains

XMLWordPrintable

    • 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:

      1. CCB1 -> CCB -> CCB3
      2. 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:

      1. Start chain
      2. Test if next chain member is not in scheduled command blocks list
        1. If true continue with step 3
        2. If false continue with step 2
      3. Schedule this chain command block for this tick
      4. Add command block to scheduled command blocks list
      5. Continue step 2 until chain finishes
      6. Continue step 1 until all impulse and repeating command blocks were executed

      And now a possible solution:

      1. Start chain
      2. Test if next chain member is not in scheduled command blocks list
        1. If true continue with step 3
        2. If false continue with step 2
      3. Schedule this chain command block for this tick
      4. Add command block to scheduled command blocks list
      5. Continue step 2 until chain finishes
      6. Clear sheduled command blocks list
      7. Continue step 1 until all impulse and repeating command blocks were executed

            searge [Mojang] Searge (Michael Stoyke)
            marcono1234 [Mod] Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: