Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-271517

Entities immune to some/all effects show as being affected when using @e

XMLWordPrintable

    • 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.

            Unassigned Unassigned
            Arnav78 Arnav
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: