Selector arguments won't accept multiple type arguments
If you try to use multiple "type" arguments, it will ignore all but the last one. Also occurs with the "name" argument.
Environment
Operating system: OSX 10.9.5
Java Version "1.6.0_65"
Linked Issues
is duplicated by2
Created Issue:
Selector arguments won't accept multiple type arguments
If you try to use multiple "type" arguments, it will ignore all but the last one.
Environment
Operating system: OSX 10.9.5
Java Version "1.6.0_65"
Changed Description:
If you try to use multiple "type" arguments, it will ignore all but the last one. Also occurs with the "name" argument.
Deleted Comment:
A comment with security level 'global-moderators' was removed.
Added Assignee:
[Mojang] Grum (Erik Broes)
Added Linked Issues:
is duplicated by
Added Linked Issues:
is duplicated by
Deleted Comment:
This issue has since been fixed.
Confirmed.
Considering you can use the ! (not) logical operator, so type=!Player selects everything except players, and the comma acts as an 'and' operator, so type=Sheep,name=Wooly selects only entities which are sheep and have the name Wooly, I find it odd how there is no 'or' operator.
Yes, an "or" operator would be incredibly useful (although you can simulate many of its functions with the scoreboard), but that's not a bug, it's a feature suggestion. You can post it on the suggestion subreddit http://www.reddit.com/r/minecraftsuggestions/
KingSupernova, then this is ticket also a feature request since type=Sheep,type=Bat is nothing more than ORing of the types.
But other selector arguments, such as scoreboard objectives and XP level, do accept multiple arguments.
And no, "type=Sheep,type=Bat" would search for any entity that is both a sheep and a bat, and would find nothing.
Really Mojang? I'm very disappointed in this resolution. There is no reason multiple arguments of the same type shouldn't work. If it would take too much work to fix this, at least mark it as "Won't Fix". I highly doubt that you intentionally designed the system so that multiple arguments wouldn't work.
It's probably so they don't have to define semantics for multiple occurences of the same criteria. Should it be OR? AND? Dependent on the criteria?
This resolution forces up to use more command blocks, say you want all hostile mobs only, you could have used
Now we have to get 1 command block per entity we want, and thus increase memory load (not much, but still increase it)
@KingSupernova "Won't Fix" means there is a bug. There isn't one, hence "Working as Intended". It was designed in a specific manner, and you're asking for it to be designed in a different manner. Any basic key/value (associate) array cannot accept duplicate keys. It's the same case here.
See also: https://en.wikipedia.org/wiki/Associative_array
@Redstonehelper:
That's not an issue. All the current arguments are treated as ANDs, there's no reason this one would be an OR.
@Skylinerw:
There is certainly a bug. Other arguments, such as position, do accept multiple arguments. There is no reason why type wouldn't, other than that it would take too much work to fix.
I do not understand what you mean; "x" is not the same key name as "y" or "z". There are no duplicate key names at all being used. Even score parameters are unique because your input ensures it is unique. Nowhere on this list are there duplicate key names:
The left is the key name while the right is the value. You cannot have multiple of the same parameter because that's not how associative arrays work.
If by "position" you mean the 3 different parameters "x", "y", and "z", then that's 3 different parameters. They all have unique key names. They are used together, but they are not the same argument. Whether or not they're used together is unrelated anyway because the parameters themselves ("x", "y", "z") do follow the "unique key name" rule, while your request breaks that rule.
EDIT: This discussion should probably be taken to the reddit instead: https://www.reddit.com/r/Mojira/
Yes, please.