The Blindness fog renderer does not consider that other Blindness instances may be shadowed when the fadeout animation is played. What this means is that when there's a shorter Blindness instance that's shadowing a longer one and the shorter one ends, the fog fadeout animation plays, and the player is temporarily able to see beyond the normal range that the longer Blindness normally allows for. This does not happen if a longer instance is shadowing a shorter one and the shadowed, shorter one ends.
This also happens to the Darkness effect's fog fadeout animation.
I develop a mod that deals the Blindness effect to the player on the client side, and discovered this bug when playing with other mods. I decided to investigate and discovered it happens in the vanilla version of the game, without any mods.
Steps to reproduce
Get inflicted with a long lasting Blindness effect instance
Get inflicted with a shorter Blindness effect instance that shadows the first one
Wait out the shorter Blindness instance
Linked issues
Attachments
Comments 3
248194 covers two separate issues, both related to the interaction between status effect fogs with ambient fogs, they're different fogs. This issue specifically covers interaction between status effect fogs with themselves, and how the status effect fog renderer ignores shadowed status effect instances of the same status effect.
While I think a refactor may be needed in order to fix 268785, I'd like to hear your thoughts on how intelligently the game should choose which singular fog to render, since the expected outcome of this issue is for the instances' fogs to visually stack and render together.
In my mind there isn't much difference between fading Blindness taking priority over lower-level Blindness and fading Blindness taking priority over Darkness; in both cases the game could theoretically re-check the start and end distances of the current fog effect and compare them against the other applicable effects, and a full refactor to this end would be the best way to go. It's true that the Blindness-Blindness/Darkness-Darkness case could be fixed by simply making the game check the duration of the shadowed effect, but this would be of marginal benefit to the game and would necessarily have to be overwritten as part of a fix for MC-248194, so I don't really think it's worth tracking as a separate issue. It was my intention to make that ticket a catchall for the interaction between different fog effects, and I realize now that it was a mistake to give the potion effect fog-ambient fog issue such prominence; I will rewrite it to focus on the core issue and give the technically-fixable-without-a-refactor cases a briefer mention.
MC-248194 is the core issue here, although this issue (MC-268785) could also be fixed by making the game more intelligently choose which of the applicable fog effects it will render.