The bug
When a potion effect has a duration equal to or higher than 1639, its duration is displayed as "**:**", see also MC-18836.
This implies that the potion effect lasts forever, but this is not the case. However, because of MC-44936 the client will not notice when the duration becomes lower than 1639.
Important: If this report is considered invalid, the field net.minecraft.potion.PotionEffect.isPotionDurationMax
should be set to false
by the method net.minecraft.potion.PotionEffect.deincrementDuration()
if the value is below 1639.
How to reproduce
Use the following command
/effect give @s speed 1639
→ ❌ The duration is displayed as "**:**"
Reopen the world
→ ✔ The actual duration is displayed and is decreasing
I don't believe this is a bug. I just checked the wiki and here is a caption from the Behavior section:
Note that even with commands, effects cannot be made to last forever. If an effect is set to an excessively large amount of time, such as 182 hours [655200 seconds], it will display as "*:*", but will still continue ticking down and eventually expire.
I believe this is implemented just to show that the timer is very high and may never be reached.