-
Notifications
You must be signed in to change notification settings - Fork 33
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
ModConfig::getHandler
has gone missing
#69
Comments
The behavior you want is now the default: neoforged/NeoForge#376, therefore it is not useful to provide a custom file type handler. |
Thanks, that's great! |
I used to subclass In order to keep compatibility with previous versions of my mods' configs without this extension point, the only option I can see amounts to replicating my own Is there any reason for this change I'm not aware of, other than simplifying the configs? (judging from the intent of #40) |
Other formats were not meant to be used in the first place. The Forge config system is TOML only. |
Well, I'd say it was night-config only until now, which allowed for arbitrary formats without much trouble, but I understand. At least this opportunity will help make my config framework easier to port in the future. |
ModConfig::getHandler
was used to get an implementation ofConfigFileTypeHandler
for a specificModConfig
.In #40 all invocations of that method have been inlined with
ConfigFileTypeHandler#TOML
.The ability to return a custom file handler instance extending
ConfigFileTypeHandler
was useful to me, as it allowed to alter some behavior, mainly placing my server config files in.minecraft/config
so they can be used globally instead of relying on the default local placement in.minecraft/saves/<world>/serverconfig
.https://github.com/Fuzss/puzzleslib/blob/98f507fdaf1fa4c33eb8e783d3713f15e231af24/1.20.1/Forge/src/main/java/fuzs/puzzleslib/impl/config/core/ForgeConfigFileTypeHandler.java#L73
I'm also aware that the Corail Woodcutter mod uses this method, since I got the idea from there: https://github.com/Corail31/woodcutter/blob/1.20/src/main/java/ovh/corail/woodcutter/config/CustomConfig.java
Getting
ModConfig::getHandler
back would be much appreciated, as there is no reasonConfigFileTypeHandler#TOML
has to be inlined everywhere.Alternatively giving this suggestion another thought would also solve this issue for me (since implementing that change to the server config file path is the main purpose of my custom
ConfigFileTypeHandler
).The text was updated successfully, but these errors were encountered: