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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 17w50a
    • Minecraft 17w49b
    • None
    • Windows 10, Java 1.8.0_25 64bit
    • Unconfirmed

      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.

        1. grass_block.json
          0.1 kB
        2. setup.png
          setup.png
          65 kB

            dinnerbone [Mojang] Nathan Adams
            JochCool JochCool
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: