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

Custom tags can match air if they contain an invalid block name

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 17w49b
    • Fix Version/s: Minecraft 17w50a
    • Labels:
      None
    • Environment:

      Windows 10, Java 1.8.0_25 64bit

    • Confirmation Status:
      Unconfirmed

      Description

      Consider the following custom tag.

      {
          "values": [
              "minecraft:grass_block",
              "minecraft:doesnotexist"
          ]
      }
      

      When this tag is used to test for blocks, it correctly finds grass blocks and does not find other blocks, but it incorrectly finds air. This is shown in the attachment setup.png, where each command block contains the following command:

      execute if block ~-2 ~ ~ #test:grass_block run say <block>

      where <block> is replaced by the name of the block it is testing for. After pushing the button, it is clear that, alongside grass, air is also detected by this custom tag. If the non-existent block "minecraft:doesnotexist" is removed from the list, then it does correctly not detect air.

      The expected behaviour is that an error or a warning is shown in the game log, and that it does not detect air.

        Attachments

          Activity

            People

            • Assignee:
              dinnerbone [Mojang] Dinnerbone (Nathan Adams)
              Reporter:
              JochCool JochCool
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: