-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Added configuration screen #1199
Conversation
Last commit published: d65fea96c1d5cb88fba78811942bce4f308fde97. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1199' // https://github.com/neoforged/NeoForge/pull/1199
url 'https://prmaven.neoforged.net/NeoForge/pr1199'
content {
includeModule('net.neoforged', 'testframework')
includeModule('net.neoforged', 'neoforge')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1199
cd NeoForge-pr1199
curl -L https://prmaven.neoforged.net/NeoForge/pr1199/net/neoforged/neoforge/21.0.155-beta-pr-1199-ui/mdk-pr1199.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip To test a production environment, you can download the installer from here. |
@HenryLoenwind, this PR introduces breaking changes.
|
Also, if someone would clean up neoforge's own configuration in regards to which ones are missing entries in the language file and which entries in the language file are zombies from old versions, that'd be great. For this, note that the UI tries to get the tooltip from the language file and only uses the comment as fallback. While this doubles the text into two places, it also allows the tooltip to be translated and the comment to be present on servers. |
Hello from the docs team! The entire config article still needs a rework, so documentation for this system should best be added alongside that rework as a whole. In other words, don't let a missing docs PR stop you from merging this. |
People put all kinds of stuff into the system, like List<List<Object>> = { {String, Number}, ... }. Better at least show the user that there is something or they might think we're broken.
Can't edit values that have been synced to others or could be synced in the middle of editing.
or should I say "more sane undo system"?
And prevent invalid lists from being committed
Including some minor changes for better extendibility
Also deprecated old methods that don't have a new value supplier
and made breadcrumb character translatable for RTL languages
Fixed button overlap Reinstated translation warning Split translation warning Fixed "single config" detection
I am approving this PR based off of end modder behavior and not the code portion. Just be sure to add to PR description that modders gets a console output of untranslated keys only if they visit the screens with the untranslated stuff and then exit the config gui. This should be stated so modders know this behavior exists. Narrator support could be a future PR |
@HenryLoenwind Looks like there's a conflicting file rn |
Screen createScreen(Minecraft minecraft, Screen modListScreen); | ||
Screen createScreen(ModContainer container, Screen modListScreen); |
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.
@HenryLoenwind This is a (small) breaking change, please include the breaking change tag on this commit for visibility or add a backward compatible method.
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.
@Matyrobbrt Your change ^
It's not completely finished, but very close to a state I'd stop with.
This re-adds a generic configuration UI that can show and edit all the values the configuration system can handle. It is opt-in, and mods can use it as a base class to do their own thing. It mostly uses vanilla's configuration system with a couple of tweaks on top.
There are no breaking changes. It is mostly self-contained, with the exception of an addition to how lists are configured. For one, it allows mods to restrict the lengths of lists (in both directions), but more importantly, it gives the UI a way of creating new elements to add to lists.
I also fixed 2 configuration values that still had "forge" in the code but "neoforge" in the language file.
Open TODOs:
To use this in a mod, add
container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
to your client-mod class constructor. (Although this probably works fine in the normal mod class, but the advanced constructor wouldn't.)