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

Unexpected behaviour with tag selectors.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 15w34a, Minecraft 15w34b
    • Windows 7, java 8
    • Unconfirmed

      Two pigs are both given the tag 'pig', two chickens given the tag 'chicken' and one cow is given both 'pig' and 'chicken' tags, so that the command:

      /say @e[tag=pig]

      will output "Cow, Pig and Pig" and

      /say @e[tag=chicken]

      will output "Chicken, Chicken and Cow".
      However the command:

      /say @e[tag=pig,tag=chicken]

      will output "Chicken, Chicken and Cow" even though both chickens do not have the tag 'pig'. I expected the output to be only "Cow" as it is the only entity with both tags.

      I assume this is following the same rules as the 'type' selector and ignoring all but the last. But due to the fact that an entity can have multiple tags I believe this to be unintended behaviour. I expected tags to function like score selectors in that multiple selectors can be used with the commas functioning as AND operators.

            Unassigned Unassigned
            TheNarcolept s c
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: