mojira.dev
MC-312660

Withers and ender dragons are affected by instant splash potions

The bug

Withers and ender dragons are supposed to be immune to all effects (see jeb’s comment on MC-83271). However, they are not immune to splash potions that give instant effects. Splash potions of harming hurt the dragon (if thrown by a player, since the dragon is immune to other damage), and splash potion of healing heal the dragon. Withers are affected inversely, like other undead. Area effect clouds with the same effects also behave the same.

However, these mobs are immune to other sources of instant effects, namely arrows (MC-248275) and the /effect command.

If it’s intended for these mobs to be immune to all effects, then they should be unaffected by splash potions and area effect clouds.

If it’s intended for these mobs to be vulnerable to the three instant effects, then they should not be immune to arrows and /effect.

Currently, the intended design is unclear because of the conflicting behavior.

How to reproduce

  1. Spawn a wither

  2. /effect give @e[type=wither] instant_health
    -> The wither is immune

  3. Throw a splash potion of healing at it
    -> It takes damage

Expected result

The wither should either be immune in both steps, or neither

Observed result

The wither is immune to the command, but takes damage from the potion

Code analysis

Both mobs override addEffect to always return false. This stops most effects from being applied, but doesn’t prevent instant splash potions and area effect clouds, which use applyInstantaneousEffect instead. Tipped arrows and /effect always use addEffect, even for instant effects.

Comments 0

No comments.

tryashtar

(Unassigned)

Unconfirmed

26.3, 26.4 Snapshot 4

Retrieved