Skip to content

Fix lens swapping and lens case - #127

Open
thehoblit wants to merge 13 commits into
masterfrom
fixLenses
Open

Fix lens swapping and lens case#127
thehoblit wants to merge 13 commits into
masterfrom
fixLenses

Conversation

@thehoblit

@thehoblit thehoblit commented May 26, 2026

Copy link
Copy Markdown

Closes GTNewHorizons/GT-New-Horizons-Modpack#22418

Fixes swapping lenses eating an entire stack of lenses.

Makes all lenses have a max size of 1 for safer swapping and because it just makes sense for these to not stack.

Also fixes a bug where shift clicking a lens in to the lens case would leave behind a ghost item until closing the gui.

Because I can't help myself, this also cleans up the lens selection GUI. it no longer shows duplicates, bugs out the mouse capture, doesn't swap at random if you tap the key without letting the GUI fully open, and is a lot more efficient with early returns.

Second set of fixes:

Closes GTNewHorizons/GT-New-Horizons-Modpack#20632

I extracted the custom night vision effect for lenses to it's own file to also apply it to the water lens, and I made the lens properly remove it's effects when changed or removed from an item.

@thehoblit thehoblit changed the title Many such fixes Fix lens swapping and lens case May 26, 2026
@thehoblit
thehoblit marked this pull request as draft May 26, 2026 03:23
@thehoblit
thehoblit marked this pull request as ready for review May 27, 2026 04:58
@thehoblit
thehoblit marked this pull request as draft June 8, 2026 04:10
@thehoblit
thehoblit marked this pull request as ready for review June 8, 2026 04:22
@thehoblit thehoblit added ✔️ Tested in full GTNH instance This Pull Request has been tested in a full GTNH install. Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it. labels Aug 30, 2026
@Nikolay-Sitnikov Nikolay-Sitnikov self-assigned this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it. ✔️ Tested in full GTNH instance This Pull Request has been tested in a full GTNH install.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thaumcraft lenses disapearance Illumine Lens wierdness

2 participants