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

Repeating command runs one iteration to much

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 16w06a
    • None
    • Unconfirmed

      When you stop a repeating commandblock with /setblock later in the chain, the whole chain still runs an extra iteration. Only if the repeating commandblock itself executes the /setblock command execution is stopped immediately.

      This can easily be observed with the following setup:

      • Create a repeating commandblock that needs redstone
      • Enter the command: /say hi
      • Create a chain command next to the first (in positive x direction). It should be always active
      • Enter the command: /setblock ~-2 ~ ~ stone
      • Place a redstone block in negative x direction next to the repeating commandblock

      What I observed is that it will print hi two times.
      What I expected to happen is only one hi.

      It is very interesting that if you switch the commands:

      • repeating: /setblock ~-1 ~ ~ stone
      • chain: /say hi
        it correctly prints only one hi.

      This is a really annoying bug, because if i have loops that should terminate at some point, they always run one time to much. This messes up a lot of things like scoreboard counter, continuous teleportation.

            Unassigned Unassigned
            Adrodoc55 Adrodoc55
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: