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

Use primitive Supplier and improve obsolete mod list handling #607

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

WaitingIdly
Copy link
Contributor

changes in this PR:

  • use BooleanSupplier instead of Supplier<Boolean> for the mixin and obsolete mods maps.
  • centralize code determining the behavior of obsolete mods.
  • ensure the obsolete mods list is not run twice when starting a pack. minor thing, but it was weird.

Copy link

what-the-diff bot commented Dec 20, 2024

PR Summary

  • Upgraded obsolete mods message condition
    The condition to display messages about outdated modules has been improved in UniversalTweaks.java by using a dedicated method (hasObsoleteModsMessage()) instead of manually inspecting a list.

  • Enhanced control over obsolete mods visibility
    The file UTConfigGeneral.java now features improved handling of visibility for outdated module notifications, introducing a method to reset visibility.

  • Refactored configuration in UTLoadingPlugin.java
    The handling of server-side, common, and client-side configuration settings has been improved by using BooleanSupplier for better clarity and ease of use.

  • Updated method for mixin configuration
    The shouldMixinConfigQueue method in UTLoadingPlugin.java now aligns with the changes in configuration types, streamlining the process with updated method calls.

  • Updated mixin configuration handling in UTMixinLoader.java
    Updates were carried out in UTMixinLoader.java to bring its handling of mixin configurations in line with the new BooleanSupplier approach.

  • Improved GUI events in UTCompatScreenHandler.java
    The UTCompatScreenHandler.java file has been updated to benefit from the new hasObsoleteModsMessage() method, enhancing how GUI events are managed.

  • Added obsolete mods handling and visibility methods in UTObsoleteModsHandler.java
    This file now includes new methods for controlling visibility of outdated modules and preparing a list of such modules for display.

  • Encapsulated logic for generating obsolete mods list
    The logic for preparing the list of outdated modules has been enclosed in a new method getObsoleteModsList() for improved clarity and maintenance.

@ACGaming ACGaming merged commit cf0c1e0 into ACGaming:main Dec 20, 2024
1 check passed
@WaitingIdly WaitingIdly deleted the improve-obsolete-handler branch December 21, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants