-
Notifications
You must be signed in to change notification settings - Fork 0
v1.4.0 🎉 #9
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
v1.4.0 🎉 #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the mod’s version to v1.4.0 by closing issues #7 and #8 while refactoring keybindings, configuration management, and exception-based control flows. Key changes include the introduction of utility classes for keybindings and default configurations, refactoring to use the Singleton pattern instead of static variables, and updating rendering and tracking methods to throw exceptions on error.
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/client/java/dev/quickinfos/utils/KeyUtils.java | Adds methods to register keybindings for toggling and showing the menu. |
| src/client/java/dev/quickinfos/utils/DefaultConfigUtils.java | Provides default key code values for configuration. |
| src/client/java/dev/quickinfos/trackers/* | Updates Tracker interface and implementations to throw exceptions rather than returning silent defaults. |
| src/client/java/dev/quickinfos/screen/QuickInfosScreen.java | Migrates UI elements to use the Singleton pattern and adjusts layout dimensions. |
| src/client/java/dev/quickinfos/infos/* | Converts render methods in Info classes to throw exceptions on errors and updates behavior accordingly. |
| src/client/java/dev/quickinfos/config/* | Enhances configuration saving/restoration by including additional parameters. |
| src/client/java/dev/quickinfos/Singleton.java | Replaces StaticVariables with Singleton, centralizing configuration and instance management. |
| src/client/java/dev/quickinfos/QuickInfosClient.java | Adjusts tick event handling and screen rendering to utilize the new exception flow and Singleton data. |
Files not reviewed (1)
- gradle.properties: Language not supported
Comments suppressed due to low confidence (2)
src/client/java/dev/quickinfos/trackers/DeathCoordinatesTracker.java:19
- Throwing an exception from shouldTrigger when client.player is null diverges from the typical boolean return pattern; consider whether a graceful false return might be more appropriate or ensure that all tracker implementations are updated accordingly.
if (client.player == null) throw new CannotCheckTriggerConditionTrackerException(this);
src/client/java/dev/quickinfos/screen/QuickInfosScreen.java:84
- [nitpick] The adjustment of the y coordinate from 80 to 100 changes the layout of the info list; please confirm that this new offset is intentional for UI consistency.
int y = 100;
| String[] rawLines; | ||
| try { | ||
| rawLines = Singleton.ORDERED_INFOS.stream().map(info -> info.isOn() ? info.render(client) : "").toArray(String[]::new); | ||
| } | ||
| catch (CannotRenderInfoException e){ | ||
| // Abort if one info cannot be rendered as they all depend on client | ||
| return; | ||
| } | ||
|
|
Copilot
AI
Mar 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching a CannotRenderInfoException for the entire stream mapping causes all info rendering to abort if one fails; consider handling exceptions on a per-info basis to allow partial rendering.
Closes #7
Closes #8