Skip to content

Fix: Fullbright night vision setting improper state handling - #333

Merged
beanbag44 merged 2 commits into
lambda-client:1.21.11from
0xTas:fullbright-disable
Sep 28, 2026
Merged

beanbag44 merged 2 commits into
lambda-client:1.21.11from
0xTas:fullbright-disable

Conversation

@0xTas

@0xTas 0xTas commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Reworks Fullbright so that the night vision setting works as expected, and fixes a few other issues with the module's current behavior.

  • Problem: enabling the module causes the code in LightmapTextureManagerMixin to run regardless of whether the night vision setting is enabled or disabled.

    • Fix: LightMapTextureManagerMixin now checks the value of the night vision setting before forcing Fullbright via Lightmap injection.
  • Problem: The night vision effect is not removed when the module is disabled, only when the setting is.

    • Fix: The module now disables night vision if the setting is enabled & the status effect is active when the module is disabled.
  • Problem: The night vision effect is only ever applied once per-session when the module is activated, due to the usage of a single-use event listener.

    • Fix: listenOnce has been changed to a listen handler so that the module properly activates the night vision effect whenever it should.
  • Problem: The night vision setting grants or removes the status effect regardless of the Fullbright module's state.

    • Fix: Changing the setting now updates the night vision status effect only when the module is active.

Related changes:

  • The description text for the night vision setting has been altered to better reflect its primary use-case, which is improved compatibility with various shaderpacks.
  • I've altered the injection point inside of LightmapTextureManagerMixin to avoid a brittle At.Shift.Before operation and improve readability. The injected code now runs directly after this.buffer.rotate() and directly before profiler.pop().

This PR resolves #332

@KMatias123 KMatias123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I didn't do in game testing for it.

@beanbag44
beanbag44 self-requested a review September 28, 2026 11:40
@beanbag44

Copy link
Copy Markdown
Member

intellij wont let me submit my review lol, but all looks good aside from the mixin formatting. The mixin annotation should all be one line with the function immediately below

@0xTas

0xTas commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

intellij wont let me submit my review lol, but all looks good aside from the mixin formatting. The mixin annotation should all be one line with the function immediately below

You prefer it all on a single line regardless of the length? I usually keep stuff on one line unless I truly find it causes readability to suffer, but I can change it back if that's the style Lambda's going with.

@beanbag44

Copy link
Copy Markdown
Member

intellij wont let me submit my review lol, but all looks good aside from the mixin formatting. The mixin annotation should all be one line with the function immediately below

You prefer it all on a single line regardless of the length? I usually keep stuff on one line unless I truly find it causes readability to suffer, but I can change it back if that's the style Lambda's going with.

for now, yeah. Its something we can change in the future if opinions change, and was a decision made before i joined the project. I think its the same reason setting are all on one line; to compact the classes

@0xTas

0xTas commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Sounds good, I've put it back on one line so this should be ready to merge whenever.

@beanbag44

Copy link
Copy Markdown
Member

awesome sauce, tyvm!

@beanbag44
beanbag44 merged commit 1074f46 into lambda-client:1.21.11 Sep 28, 2026
@0xTas
0xTas deleted the fullbright-disable branch September 29, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: Night Vision not off when not using Fullbright

3 participants