@e target selector not working with some commands
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.
What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities. This is a lack of control which @e would benefit to include.
Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:
/give @e[type=Zombie,r=5,c=-1] minecraft:stone_sword
/clear @e[type=Zombie,r=5,c=-1] minecraft:stone_sword 0 0
2. Instead of the zombie respectively being given a stone block or returning if it has a stone block, you will receive the message: That player cannot be found
Created Issue:
@e target selector not working with some commands
@e target selector does not work with some commands I think would make sense to be possible. This includes /playsound and /spreadplayers, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /playsound and /spreadplayers with an entity target selector (@e), I would be able to respectively play a sound at or near the entity, and spread entities randomly over an area.What actually happened was...:
In the case of /playsound, I receive the message "That player cannot be found" for each entity the selector finds. In the case of /spreadplayers, I receive the message "'NaN' is not a valid number".Steps to Reproduce:
/playsound
1. With commands enabled, copy and paste this into the chat:/playsound mob.chicken.plop @e[type=Chicken] ~ ~ ~2. For each Chicken found, you will receive the message: That player cannot be found
/spreadplayers
1. With commands enabled, copy and paste this into the chat:/spreadplayers ~ ~ 30 40 false @e[type=Chicken]2. For each Chicken found, you will receive the message: 'NaN' is not a valid number
@e target selector does not work with some commands I think would make sense to be possible. This includes /playsound and /spreadplayers, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /playsound and /spreadplayers with an entity target selector (@e), I would be able to respectively play a sound at or near the entity, and spread entities randomly over an area.What actually happened was...:
In the case of /playsound, I receive the message "That player cannot be found" for each entity the selector finds. In the case of /spreadplayers, I receive the message "'NaN' is not a valid number".Steps to Reproduce:
/playsound
1. With commands enabled, copy and paste this into the chat:/playsound mob.chicken.plop @e[type=Chicken] ~ ~ ~2. For each Chicken found, you will receive the message: That player cannot be found
/spreadplayers
1. With commands enabled, copy and paste this into the chat:/spreadplayers ~ ~ 30 40 false @e[type=Chicken]2.
For each Chicken found, you will receive the message: 'NaN' is not a valid number@e target selector does not work with some commands I think would make sense to be possible. This includes /playsound and /spreadplayers, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /playsound and /spreadplayers with an entity target selector (@e), I would be able to respectively play a sound at or near the entity, and spread entities randomly over an area.What actually happened was...:
In the case of /playsound, I receive the message "That player cannot be found" for each entity the selector finds. In the case of /spreadplayers, I receive the message "'NaN' is not a valid number".Steps to Reproduce:
/playsound
1. With commands enabled, copy and paste this into the chat:/playsound mob.chicken.plop @e[type=Chicken] ~ ~ ~2. For each Chicken found, you will receive the message: That player cannot be found
/spreadplayers
1. With commands enabled, copy and paste this into the chat:/spreadplayers ~ ~ 30 40 false @e[type=Chicken]2. You will receive the message: 'NaN' is not a valid number
@e target selector does not work with some commands I think would make sense to be possible. This includes /
playsound and /spreadplayers, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.What I expected to happen was...:
When using /playsound and /spreadplayerswith an entity target selector (@e), I would be able to respectivelyplay a sound at or near the entity, and spread entities randomly over an area.What actually happened was...:
In the case of /playsound, Ireceive the message "Thatplayer cannot be found"for each entity the selector finds. In the case of /spreadplayers, I receive the message "'NaN' is not a valid number".Steps to Reproduce:
/playsound
1.Withcommands enabled, copy and paste this intothechat:/playsound mob.chicken.plop @e[type=Chicken] ~ ~ ~2. For each Chicken found, you will receive the message: That player cannot be found
/spreadplayers
1. With commands enabled, copy and paste this into the chat:/spreadplayers ~ ~ 30 40 false @e[type=Chicken]2.
You will receive the message:'NaN' is not a valid number@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5] 1
/clear @e[type=Zombie,r=5c=-1] 1 0 02. Instead of the zombie respectively being given a stone block or returning of it has a stone block, you will receive the message: That player cannot be found
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5] 1
/clear @e[type=Zombie,r=5,c=-1] 1 0 02. Instead of the zombie respectively being given a stone block or returning of it has a stone block, you will receive the message: That player cannot be found
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5,c=-1] 1
/clear @e[type=Zombie,r=5,c=-1] 1 0 02. Instead of the zombie respectively being given a stone block or returning of it has a stone block, you will receive the message: That player cannot be found
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5,c=-1] 1
/clear @e[type=Zombie,r=5,c=-1] 1 0 02. Instead of the zombie respectively being given a stone block or returning
of it has a stone block, you will receive the message: That player cannot be found@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities. This is a lack of control which @e would benefit to include.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5,c=-1] 1
/clear @e[type=Zombie,r=5,c=-1] 1 0 02. Instead of the zombie respectively being given a stone block or returning if it has a stone block, you will receive the message: That player cannot be found
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities. This is a lack of control which @e would benefit to include.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5,c=-1]1
/clear @e[type=Zombie,r=5,c=-1]10 02. Instead of the zombie respectively being given a stone block or returning if it has a stone block, you will receive the message: That player cannot be found
@e target selector does not work with some commands I think would make sense to be possible. This includes /give and /clear, and I will use those as examples. There are other commands which could benefit from @e, although I will need to look up the format to test them.
What I expected to happen was...:
When using /give and /clear with an entity target selector (@e), I would be able to respectively give the entity an item and clear the entities inventory or specific items.What actually happened was...:
For each entity, you receive the message "The player cannot be found," meaning that the commands do not support entities. This is a lack of control which @e would benefit to include.Steps to Reproduce:
1. Have commands enabled and be within 5 blocks of a zombie, then copy and paste either of these commands into chat:/give @e[type=Zombie,r=5,c=-1] minecraft:stone_sword
/clear @e[type=Zombie,r=5,c=-1] minecraft:stone_sword 0 02. Instead of the zombie respectively being given a stone block or returning if it has a stone block, you will receive the message: That player cannot be found
WAI for @e. MC-44517
Actually, there are two problems with your commands that are unrelated to the @e selector : the first one is because the player selector designs who gets to hear the sounds, not the actual position of the sound.
The second ones comes from another unrelated bug :
MC-44545Ah... Okay, So spreadplayers work and your explanation of playsound... I forgot about that... So what about /clear, /enchant, and /give? Any word on those?
Updated the description to discuss correct commands which don't work.
Mobs don't actually have inventories, even though some of them can hold items and wear armor.
Although they still act as slots in a way, so it'd be a way to pass them armor. You could just make sure they have pickup set to true and summon items on them, but then there's the chance of players picking them up, as well as forcing mobs to be artificially spawned.
Entities also includes paintings and item frames.
What I'm suggesting is that this isn't a bug, and would require a fair amount of work. It probably crosses the line into feature request.
Well this doesn't just apply to give and clear, but any commands still not fully supported by @e selectors. I originally had other commands, but had to change them. For instance, using /enchant to upgrade a enemies weapon during a fight.
I have another example for consideration:
If you use this more than a few times, you can start to get lots of Entity Cannot be Found warnings.
Is this still a concern in the current Minecraft version 14w21b / Launcher version 1.4.4 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.
Confirmed for 14w21b.
Maybe entities are not yet supported by these commands.
Examples:
Usage: /give <player> <item> [amount] [data] {dataTag]
Usage: /clear [player] [item] [data] [maxCount] [dataTag]
The cannot find player error probably occurs because it expects a player name to be used, not entity names/ the @e selector.
A possible work around would be the use of the replace item command, though this command may not have been added when this issue was reported.
Tested in 1.8.3
The clear and give command don't work in the 1.11 snapshots, too!