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

Using /setblock to replace a command block with a new one that is Always Active does not run the command in the command block

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 25w02a
    • None
    • Community Consensus
    • Block states, Commands

      With the latest change to the behaviour of /setblock to successfully replace and recreate the block entity of blocks set with their NBT data specified, one would expect that replacing a command block with a new one should cause the block entity to run the command as if placed normally. (It should behave in the same way that using /setblock on any other block would)

      Steps to Reproduce:

      1. Open a world in 25w02a and run the command
        /setblock ~1 ~ ~ command_block{auto:1b,Command:"/say hi"}
        1. Observation: The command block runs /say hi correctly.
      2. While in the same location, run the same command again.
        1. Observation: The command is successful, but the command block does not run its command.

      Observed Result:

      The command block runs when set on a non-command_block block, but does not run when replacing a command_block block.

      Expected Result:

      The command block should run its command instantly when set with /setblock or /fill, regardless of if it is replacing another command_block block

            Unassigned Unassigned
            Deoxyribonucleic Evans DorkOrc
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: