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

/setblock succeeds while claiming to fail in chat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.2, 1.19.3, 1.20.3 Release Candidate 1, 1.20.4, 1.21.1
    • None
    • Confirmed
    • Commands
    • Low
    • Platform

      The /setblock command is documented to avoid replacing certain redstone components in unstable situations, as detailed here. However, the command succeeds in placing certain blocks even when it registers a failure in chat.

      Steps to reproduce:
      1. Place two standing redstone torches next to each other
      2. Stand on one of the torches and run /setblock ~ ~ ~ minecraft:tnt replace
      3. "Could not set the block" will appear in chat, but the TNT will still be placed (and ignited)

      This effect occurs with the "replace" keyword and a null argument; it does not occur with "keep" (when the second torch is replaced with an air block) or "destroy", which contradicts the existing documentation. It would be thus helpful to locate the official specification for what the behavior should be, as I cannot track down when this was added or why (the linked documentation was updated to include the supposed intended behavior in July 2021, with some controversy).

      Nonetheless, the current behavior constitutes a bug, as failure and success should not both occur. Chaining the specified command into /execute store success confirms that the handler thinks the command failed.

        1. 2022-08-15 19-04-29.mp4
          9.01 MB
        2. MC-255198.mp4
          6.14 MB
        3. MC-255198.png
          MC-255198.png
          806 kB

            Unassigned Unassigned
            kg583 Kevin Gomez
            Votes:
            6 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: