Mojira Archive
MC-170462

Bad Omen is considered a positive effect in potion item tooltips

The bug

The bad omen effect is considered as a positive effect in the tooltips of a custom potion. I would have expect the tooltips for a custom bad omen potion to have the text to be color red as the effect icon of the actual effect appears in the lower row with the other negative effects.

How to reproduce

  1. Run the given command:
    /give @s minecraft:potion[minecraft:potion_contents={custom_effects:[{id:"minecraft:bad_omen",duration:1200}]}]
  2. Check the potion tooltips
    The tooltips shows blue text instead of red

Code analysis

In the code, the "Bad Omen" potion effect is considered to be neutral (MobEffectCategory.NEUTRAL), not negative (MobEffectCategory.HARMFUL). Neutral effects show as positive effects in tooltips, but as negative effects in the HUD.