Mojira Archive
MC-124973

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

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)

Unresolved

sofia

[Mod] redstonehelper

2018-02-09, 09:25 PM

2024-12-09, 03:38 PM

11

5

Confirmed

Commands

/execute-if-block

Minecraft 18w06a - 1.21.4Minecraft 18w06a, 1.15.2, 20w08a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w08b, 1.17, 1.17.1, 1.19, 22w24a, 1.19.3, 1.21.4

-