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
Run the given command:
/give @s minecraft:potion[minecraft:potion_contents={custom_effects:[{id:"minecraft:bad_omen",duration:1200}]}]
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.
Linked issues
is duplicated by 1
relates to 2
Attachments
Comments 17
Can confirm in 21w03a.
This also affects glowing.
Bad Omen and Glowing are set as "Neutral" effects, according to the source code. Neutral means it gets blue text (like positive) but is listed with the negatives in the hud.
This makes absolutely no sense at all. Both effects should be declared negative, or neutral should have a separate color in potions and a separate list in the hud.
Can confirm in 21w07a.
Can confirm in 21w14a.
Can confirm in 1.19.
Can confirm in 1.19.2.
Following on from my code analysis, I've double-checked my proposed fix and I can confidently confirm that it's fully functioning and works as expected, so I've attached two screenshots to this report, one of which shows the current code and the other that shows the fixed code. I feel this information may be quite insightful hence my reasoning for providing it. 🙂
[media][media]
This can now be seen without commands with the Ominous Bottle
Since bad omen is now an optional potion that you drink yourself to get good loot, it should be counted as a positive effect
Can confirm in 20w51a.