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.
Linked issues
duplicates 1
Comments 0
No comments.