mojira.dev
MC-48828

Can't specify NBTData for /execute target entity

At the moment I'm building a minigame using the new snapshot. I realized, that you can't specify NBTData for the target-entity when using /execute.

When I entered the Command "/execute @e[type=Item] {Item:{id:minecraft:grass}} say hi" ("say hi" is only for testing) I expected every Grassblock-Item on the map to say "hi". Instead I got the message "/execute <entity> <x> <y> <z> <command>".

It works using the testfor-command "/testfor @e[type=Item] {Item:{id:minecraft:grass}}", but when using this you can't do things relative to the Item.

Comments 1

You can't specify NBT Data for entity selectors or player selectors. The only exception is /testfor [entity] {dataTag}. You'll have to find an alternate way to accomplish your goal.

Adrian Freund

(Unassigned)

Unconfirmed

Minecraft 14w07a

Retrieved