mojira.dev
MC-49473

/execute doesnt check for data tags

The /execute command works with the parameters:
/execute <entity> <x> <y> <z> <command>

But it should recognize data tags, like this:
/execute <entity> [dataTag] <x> <y> <z> <command>

Comments 9

I'm having the same problem. I've been using /execute @p ~ ~ ~ testforblock ~ ~-1 ~ stained_glass_pane 1, and the command fails to execute. The testforblock command will check for data values of wood, clay, glass, etc., but when used with /execute, it will not work.

I want to use this command:
/execute @e[type=WitherSkull,score_ChestRundeRel_min=1] ~ ~ ~ clone 0 64 0 0 64 0 ~ ~ ~
The WitherSkull has the score ChestRundeRel = 11.
But the block wasn´t clone.

Is this still a concern in the current Minecraft version 14w30c or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

execute @e[type=Item] {dataTags}

Does not recognize 'dataTags' as of 14w32b

This is not a bug, this a feature request.
The syntax of the command is

execute <entity> <coords> ....

I feel like this should be considered a bug. You can't use /execute on anything with a custom name, which makes it impossible to create custom mob commands, or target specific mobs. While Kumasasa considers this a feature I consider it a missing parameter. It's the difference between 1 creeper and ALL creepers.

@e[name=NAME]
You just have to use mob names without a space as selectors don't support spaces

you can also give a entity with a custom name a scoreboard objective, as that can use data tags, and then use the execute

but no matter how you look at it, this remains a feature request because data tag testing in execute hasn't been there, ever

Well I'll be damned. So that one worked:

@e[name=NAME]

For whatever reason I got a UUID error every other time before that. Probably trying to add quotes.

you can't use quotes or spaces in the selector

Reux Minecraft

(Unassigned)

Unconfirmed

Minecraft 14w08a, Minecraft 14w17a, Minecraft 14w18b

Retrieved