Skip to content

Major Overhaul (Java autoprovisionning, in-game config)#36

Merged
Rongmario merged 10 commits intoCleanroomMC:masterfrom
AnasDevO:master
Mar 20, 2026
Merged

Major Overhaul (Java autoprovisionning, in-game config)#36
Rongmario merged 10 commits intoCleanroomMC:masterfrom
AnasDevO:master

Conversation

@AnasDevO
Copy link
Copy Markdown
Contributor

@AnasDevO AnasDevO commented Feb 21, 2026

Overview

This PR introduces a major overhaul of the Cleanroom Relauncher's user experience. It transitions the configuration process from a pre-launch GUI to a seamless install process with minimal user interaction.

Changelog

  • Relauncher can now do autoprovisionning of Java installations with FooJay API. it can be overriden by selecting manual selection.

  • The settings GUI now has argument checkboxes, to make the process of argument optimisations automated.

  • Relauncher now has new workflows:

    • First time user: Will be prompted with a GUI that has two buttons: Relaunch now, which will auto select latest cleanroom release and J25 - Zulu, and advanced settings, which will give the ability to modify the settings.
    • Modpack Maker: upon registering the settings for Automatic Install, the relauncher.json can now be shipped with the pack to automatically trigger autoprovisionning, and requires 0 input from the user.
    image
  • Instead of always provisionning new java installs, polluting the environnement of the user, Relauncher will first check for java installations that matches targetVersion and targetVendor.

  • Relauncher can be toggled in game, in both Cleanroom and Forge environnement, directly from an in-game Options menu.

Screenshots

  • image
  • image
  • image

@Bronitt
Copy link
Copy Markdown

Bronitt commented Feb 21, 2026

As both a player and a modpack developer, I’d love to see the targetVendor field support multiple values. Could you please implement this feature?

@AnasDevO
Copy link
Copy Markdown
Contributor Author

AnasDevO commented Feb 21, 2026

As both a player and a modpack developer, I’d love to see the targetVendor field support multiple values. Could you please implement this feature?

What purpose would this feature serve? only one value should be present imo

@Bronitt
Copy link
Copy Markdown

Bronitt commented Feb 21, 2026

What purpose would this feature serve? only one value should be present imo

I have Adoptium installed, while one player might have Zulu and another GraalVM. As I understand it, if I set the parameter to Adoptium, the Relauncher will download an additional Java version for those other players.

There is almost no difference between these three vendors, so why limit it to just one? I agree that a single value should be used for downloading, but for the local search on the user's device, I’d like to be able to specify multiple options.

@AnasDevO
Copy link
Copy Markdown
Contributor Author

you can set preferred vendor to Any
it will return true for any vendor

@Bronitt
Copy link
Copy Markdown

Bronitt commented Feb 21, 2026

you can set preferred vendor to Any it will return true for any vendor

Oh, I see. I hadn't looked at the code, so I wasn't aware of that feature.

@tttsaurus
Copy link
Copy Markdown
Member

Suggestions

launched with zulu 8 and zulu 25 ingame

  1. Scanning Progress Bar
    Snipaste_2026-02-21_10-02-03
    This progress bar looks relatively smaller than other menus. Could be bigger imo
  2. Download Complete
    Snipaste_2026-02-21_10-15-39
    I got a transient pop up window "Download Complete" after the Java scanning. Is that intended?
    This window also popped up for the later launches when the config is generated.
    Regardless, the percentage was always 0% and the short lived pop up window feels abruptive.
  3. Ingame Config Window
    Snipaste_2026-02-21_10-11-04
    Maybe it's less intuitive to talk about auto install when the game is launched (config is generated)?

@AnasDevO
Copy link
Copy Markdown
Contributor Author

This progress bar looks relatively smaller than other menus. Could be bigger imo

You are right, i revamped it.
image

I got a transient pop up window "Download Complete" after the Java scanning. Is that intended?
This window also popped up for the later launches when the config is generated.
Regardless, the percentage was always 0% and the short lived pop up window feels abruptive.

You are correct, that's the progress bar for downloading libraries, it mistakenly fired even when there's nothing to download. Fixed now.

Maybe it's less intuitive to talk about auto install when the game is launched (config is generated)?

Don't know what else to call it, as this configuration pane is more targetted towards pack devs.

@tttsaurus
Copy link
Copy Markdown
Member

tttsaurus commented Feb 21, 2026

Don't know what else to call it, as this configuration pane is more targetted towards pack devs.

Yeah makes sense too. Casual players won't even click that in-game config button I guess.

Also what do you think about "Discard Changes" instead of "Cancel Configuration"?

@AnasDevO
Copy link
Copy Markdown
Contributor Author

that's a good one, actually.
Will implement that.

@jchung01
Copy link
Copy Markdown
Contributor

Currently the relauncher seems to re-download Java even if it has already downloaded Java to ~/.cleanroom/java. This can be triggered by deleting relauncher.json or running first-time setup of the relauncher again in another instance.

Comment on lines +20 to +24
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(new OptionsMenuHandler());
CleanroomRelauncher.LOGGER.info("Pre-Init Event has fired Relauncher");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should move this to CleanroomRelauncher, and that file should be marked as @Mod instead, as this one is just an event handler.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should enable use_tags in gradle.properties and use the constants from generated Tags for @Mod values.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should move this to CleanroomRelauncher, and that file should be marked as @Mod instead, as this one is just an event handler.

I think it might be better to keep it in that file, for readability?

Some of the files are kinda huge already..

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not about readability, it's about naming. It's not clear that OptionsMenuHandler is a Forge mod entrypoint from the name. Please instead name it CleanroomRelauncherMod, or write a new class with that name which registers OptionsMenuHandler as a supplementary event handler.

@AnasDevO
Copy link
Copy Markdown
Contributor Author

Currently the relauncher seems to re-download Java even if it has already downloaded Java to ~/.cleanroom/java. This can be triggered by deleting relauncher.json or running first-time setup of the relauncher again in another instance.

yeah, i'm able to reproduce it now...
should probably add a check for that folder.

Copy link
Copy Markdown
Member

@Rongmario Rongmario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging it first for a beta

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.

6 participants