Mojira Archive
MC-84661

Glowing is considered a positive effect in potion item tooltips

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 [Mod] 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.