mojira.dev
MC-123001

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

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

Comments 0

No comments.

JochCool

Nathan Adams

Unconfirmed

Minecraft 17w49b

Minecraft 17w50a

Retrieved