-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.10.2, Minecraft 16w40a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.2, Minecraft 17w46a, Minecraft 18w02a, Minecraft 18w19b, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3, 1.15.2, 20w08a, 20w12a, 1.16, 1.16.1, 20w30a, 1.16.2, 1.16.4, 20w49a, 21w03a, 21w05a, 21w05b, 21w06a, 1.17, 1.17.1, 1.18.1, 1.19.1, 1.19.2, 1.19.3, 1.19.4 Pre-release 1, 1.19.4, 23w17a, 1.20.1, 1.20.2, 23w43b, 1.20.3, 1.20.4, 24w07a, 24w10a
-
Confirmed
-
Commands
-
Low
-
Platform
The bug
If you add a dropped item (or any Non-LivingBase entities) to a team, it follows the color team rule fine. The problem is, you can't target it with team=
Note
searge added a comment - 10/Aug/14 12:17 AM
Only living entities can be on a team, items are not living entities, only mobs, animals, villagers and players are.
This is not correct, as it has the color, it is on the team, so it can be added fine. The only problem is that it can't be targeted via team=
How to reproduce
- /team add Test
- /team modify Test color red
- drop an item and run
/data merge entity @e[type=item,sort=nearest,limit=1] {CustomName:"{\"text\":\"Test\"}",CustomNameVisible:1b}
- /team join Test @e[type=item,sort=nearest,limit=1]
- see the red name, indicating it's on the team
- /say @e[type=item,team=Test]
→ The command will not say "Test"
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.command.EntitySelector.getTeamPredicates(...).new Predicate() {...}.apply(Entity) returns false if the entity is not an instance of EntityLivingBase even though the method net.minecraft.entity.Entity.getTeam() is correctly implemented for all entities.
- clones
-
MC-63391 Entities Do Not Accept "team" Selector Parameter/Only living entities (mobs, animals, villagers, players) can be on a team
- Resolved
- is duplicated by
-
MC-81336 Some entities not registering in "team=" selectors
- Resolved
-
MC-159921 Commands don't seem to affect snowballs that have been assigned a team
- Resolved
-
MC-260541 @e[team=] doesn't work for interaction and text_display entities but works inside predicate
- Resolved
-
MC-262193 Displays and Interaction cannot be detected with /execute if entity[team=...]
- Resolved
-
MC-268706 Entity selector can not find non living entities with the team criteria
- Resolved
-
MC-269302 Display entities can't be selected by team selector
- Resolved
-
MC-272905 Team
- Resolved
- relates to
-
MC-267180 Non-living entities ignore team's nametagVisibility setting
- Open
-
MC-112744 Team NBT tag only exists for EntityLivingBase entities and not for all
- Open
-
MC-157196 Tamed animals cannot be added to a team
- Open