Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ModernUI GUI scale hook is no longer working on 1.18.2+ #391

Open
BloCamLimb opened this issue Sep 29, 2024 · 0 comments
Open

The ModernUI GUI scale hook is no longer working on 1.18.2+ #391

BloCamLimb opened this issue Sep 29, 2024 · 0 comments
Labels
enhancement New feature or request fixed in beta

Comments

@BloCamLimb
Copy link

Request Description

For Minecraft 1.18.2 to 1.19.4, the calcGuiScales is in icyllis.modernui.mc.forge.MuiForgeApi.
For Minecraft 1.20.1 and above, ModernUI has a multi-loader structure, the calcGuiScales has moved to icyllis.modernui.mc.MuiModApi
Including these class names to the candidate list is the way to go.

Related class: https://github.com/embeddedt/embeddium/blob/21.0/neoforge/src/main/java/org/embeddedt/embeddium/impl/compat/modernui/MuiGuiScaleHook.java

Postscript:
With the updates of ModernUI in the past two years, I have tweaked the GUI scale slider so that regardless of the current window resolution, users may choose a scale between 0 (auto) and MAX_GUI_SCALE (defined in MuiForgeApi or MuiModApi), and the effective scale will be clamped based on the current window resolution. This way, users can preset a large scale when the window resolution is small, and when the window is large enough, the scale set by the user will take effect.

@embeddedt embeddedt added enhancement New feature or request fixed in beta labels Sep 29, 2024
embeddedt added a commit that referenced this issue Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in beta
Projects
None yet
Development

No branches or pull requests

2 participants