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

Glowing is considered a positive effect in potion item tooltips

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 15w31c, Minecraft 15w32a, Minecraft 15w32b, Minecraft 15w32c, Minecraft 15w33b, Minecraft 15w33c, Minecraft 15w34a, Minecraft 15w34b, Minecraft 15w35b, Minecraft 15w39a, Minecraft 15w39b, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, Minecraft 16w41a, Minecraft 16w42a, Minecraft 1.11.2, Minecraft 17w16b, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 18w15a, Minecraft 18w19b, Minecraft 18w20b, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13.2, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w50a, 1.15.2, 20w18a, 1.16.2, 1.16.4, 20w49a, 20w51a, 21w03a, 21w05b, 21w06a, 21w07a, 21w11a, 21w17a, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1, 21w38a, 21w39a, 21w40a, 21w41a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 7, 1.18 Release Candidate 1, 1.18 Release Candidate 3, 1.18, 1.18.1, 22w03a, 22w05a, 22w06a, 22w07a, 1.18.2 Release Candidate 1, 1.18.2, 22w12a, 22w17a, 22w18a, 1.19, 1.19.1, 1.19.2, 22w43a, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.4, 23w51b, 1.21, 1.21.1, 1.21.2 Pre-Release 3, 1.21.3, 1.21.4
    • Confirmed
    • UI

      The Bug:

      Glowing is considered a positive effect in potion item tooltips.

      In the HUD, glowing is displayed as a negative effect.

      Steps to Reproduce:

      1. Give yourself a potion of glowing by using the command provided below.
        /give @s minecraft:potion[minecraft:potion_contents={custom_effects:[{id:"minecraft:glowing",duration:1200}]}]
      2. Hold your mouse cursor over the item in your inventory.

      Observed Behavior:

      Glowing is considered a positive effect in potion item tooltips. The text in the potion tooltip is blue, indicating that glowing is considered a positive effect.

      Expected Behavior:

      Glowing would not be considered a positive effect in potion item tooltips. The text in the potion tooltip should be displayed in red to indicate that it's considered a negative effect.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.

      net.minecraft.world.effect.MobEffectCategory.java
      public enum MobEffectCategory {
         BENEFICIAL(ChatFormatting.BLUE),
         HARMFUL(ChatFormatting.RED),
         NEUTRAL(ChatFormatting.BLUE);
         ...
      net.minecraft.world.effect.MobEffects.java
      public class MobEffects {
         ...
         public static final MobEffect GLOWING = register(24, "glowing", new MobEffect(MobEffectCategory.NEUTRAL, 9740385));
         ...

      If we look at the above classes, we can see that mob effects that are included within the NEUTRAL category are formatted in blue. Since the glowing effect is categorized as a NEUTRAL effect, it appears blue in potion item tooltips, therefore resulting in this issue occurring.

      Fix:

      Simply changing the categorization of the glowing effect to HARMFUL will format this effect in red within potion item tooltips, thus resolving this problem.

        1. hud.png
          hud.png
          146 kB
        2. MC-84661.mp4
          4.35 MB
        3. MC-84661.png
          MC-84661.png
          590 kB
        4. MC-84661-1.png
          MC-84661-1.png
          60 kB
        5. MC-84661 - Current Code.png
          MC-84661 - Current Code.png
          11 kB
        6. MC-84661 - Fixed Code.png
          MC-84661 - Fixed Code.png
          11 kB

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            17 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: