mojira.dev
MCPE-37479

Command blocks fail to recognize their power state changed for 3 ticks

The bug

When any command block receives power, three ticks pass before it finally runs its command. When a repeating command block loses power, it continues to run commands for three ticks!

How to reproduce

  1. Place a repeating command block: /setblock ~ ~1 ~ air

  2. Place a chain command block following it: /say running

  3. Place a redstone block on top
    → ❌ After a three ticks delay, "running" is printed three times.

Correct behavior: "running" should print once on the exact subsequent tick after the redstone block is placed.

Linked issues

Attachments

Comments

migrated

I added a vote.

migrated

Noticed that when trying to making a score system. Kept adding 3 to the score instead of 1

tryashtar

This coupled with the 1.12 delay feature makes it very confusing

USERcrosbyman64

Make the second command block conditional (meaning it will only execute if the previous command block has executed successfully)

migrated

@CJC, that would solve this particular example, it doesn't resolve the issue that it exposes. In particular, you would have to have every chain block after the repeat be conditional or risk it running multiple times. Your solution is fine for this example, which is a very simple case, but it won't work for more complex chains that by their nature need to include both conditional and unconditional commands.

tryashtar

(Unassigned)

89588 / 95402

Confirmed

Multiple

1.20.20.20 Preview, 1.13.0.1 Beta, 1.18.10.26 Beta, 1.17.40.23 Beta, 1.17.40.21 Beta, ..., 1.17.30, 1.17.32, 1.18.2 Hotfix, 1.18.31, 1.21.51 Hotfix

Retrieved