Repository navigation
Fix: Fullbright night vision setting improper state handling - #333
Conversation
KMatias123
left a comment
There was a problem hiding this comment.
LGTM. I didn't do in game testing for it.
|
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 |
|
Sounds good, I've put it back on one line so this should be ready to merge whenever. |
|
awesome sauce, tyvm! |
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.
Problem: The night vision effect is not removed when the module is disabled, only when the setting is.
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.
listenOncehas been changed to alistenhandler 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.
Related changes:
At.Shift.Beforeoperation and improve readability. The injected code now runs directly afterthis.buffer.rotate()and directly beforeprofiler.pop().This PR resolves #332