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

Bad Omen is considered a positive effect in potion item tooltips

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.15.2, 20w06a, 20w11a, 20w13b, 20w17a, 20w20a, 20w20b, 20w21a, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 20w48a, 20w51a, 21w03a, 21w05a, 21w05b, 21w06a, 21w07a, 21w11a, 21w14a, 21w15a, 1.17, 1.17.1, 1.18 Release Candidate 1, 1.18.1, 1.18.2, 22w11a, 1.19, 1.19.2, 1.19.4, 23w17a, 1.20 Release Candidate 1, 1.20, 1.20.1, 1.20.4, 23w51b, 24w13a, 1.21
    • Confirmed
    • UI
    • Low
    • Platform

      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.

        1. 2020-07-23_22.00.29.png
          2020-07-23_22.00.29.png
          175 kB
        2. MC-170462.mp4
          3.06 MB
        3. MC-170462.png
          MC-170462.png
          141 kB
        4. MC-170462 - Current Code.png
          MC-170462 - Current Code.png
          11 kB
        5. MC-170462 - Fixed Code.png
          MC-170462 - Fixed Code.png
          12 kB

            Unassigned Unassigned
            drownedzombie01 DrownedZombie
            Votes:
            19 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              CHK: