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

"/execute if block" doesn't print block id of compared block

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • Minecraft 18w06a, 1.15.2, 20w08a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w08b, 1.17, 1.17.1
    • None
    • Confirmed
    • Commands

    Description

      The bug

      The title may not be the most accurate description, or imply the best way to fix this. Here's my motivation:

      In 1.12.2, you were able to print the block id and data value of a certain block into chat by using /testforblock with a different block id, and then with a different data value, on it. This was very useful for investigating client/server desync bugs (or features...), and I'm sure there are other use cases. The 1.13 equivalent of /testforblock, /execute if block, doesn't print such feedback into chat anymore.

      To fix this issue, /execute if block could be given some appropriate chat output. If this is deemed to not be in the spirit of /execute, I suggest adding block id and block state output to /data get block.

      Reproduction steps

      1. Place a snow layer at your location
        /setblock ~ ~ ~ snow[layers=1]
        
      2. Use /execute if block
        /execute if block ~ ~ ~ snow[layers=5]
        

        It only says "Test failed", expected would be something like: "Test failed, found minecraft:snow[layers=1] instead of the expected block" (possibly also including the expected block and coordinates)

      Attachments

        1. MC-124973.mp4
          2.67 MB
        2. MC-124973.png
          MC-124973.png
          713 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              redstonehelper [Mod] redstonehelper
              Votes:
              10 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: