-
Bug
-
Resolution: Duplicate
-
None
-
1.20.6, 24w18a
-
Unconfirmed
-
(Unassigned)
The Bug
Entities who are immune to some/all effects, when targetted by the @e selector, will show as being affected by the effect, without showing any visual differences. Furthermore, if the entity is directly targetted using something like @e[type=minecraft:item], it will (correctly) show an error message saying that the target is immune. See the video attached.
It would be expected that it would not try to affect any mobs that are immune to the effect, and even if it did and failed, it should not count that in the success message.
Instructions to Reproduce
Optionally kill all entities to confirm you are the only entity in the world using the command:
/kill @e[type=!player]
Throw an item in the world.
Run the command below to affect only the items with invisibility:
/effect give @e[type=minecraft:item] minecraft:invisibility 5 0 false
— Note how it correctly states that the target is immune.
Now, making sure that the only entities that exist in the world are you and the item, run the command:
/effect give @e minecraft:invisibility 5 0 false
— Note how it says that it gave the effect to two targets, despite the item being unaffected.
You can try this with any other mobs that are unaffected by certain effects, such as the ender dragon, wither, etc. This also occurs with mobs that are immune to the new 1.21 effects, such as slimes to Oozing and silverfish to Infested.
- duplicates
-
MC-122717 Command success messages for some commands include unaffected entities, unlike command result
- Open