mojira.dev
MC-86830

Unexpected behaviour with tag selectors.

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

Comments 0

No comments.

s c

(Unassigned)

Unconfirmed

command

Minecraft 15w34a, Minecraft 15w34b

Retrieved