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

Not providing block states will make the game test for the defaults, instead of ignore the states

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 17w45a, Minecraft 17w45b
    • Fix Version/s: Minecraft 17w46a
    • Labels:
      None
    • Confirmation Status:
      Confirmed

      Description

      when running a command such as

      /execute if block ~ ~ ~ skull run say hi
      

      and standing inside a skull, the command returns false, even though it should return true. (The command doesn't run)

      this doesn't just affect execute (if/unless) block, this also affects fill replace.

      In general, testing for any block that has block states (without specifying any) will always look for the default state of the block, when really it should ignore states. Therefore, the following two commands are equivalent:
      execute if block ~ ~ ~ redstone_wire run say only unpowered redstone wire
      execute if block ~ ~ ~ redstone_wire[power=0] run say only unpowered redstone wire

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dinnerbone [Mojang] Dinnerbone (Nathan Adams)
                Reporter:
                cowslayer6789 Andrew Turcan
              • Votes:
                12 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: