Posted June 3, 20196 yr Does 1.13 have a new config system that I have to use? Or I use the legacy config system if any? (Any wiki/tutorial on the legacy system if it is?)
June 3, 20196 yr Use the new toml config system. It’s separated based on logical side. Config value holders class: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/Config.java “Baking” the configs: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ConfigHelper.java#L100-L135 Config objects holder class: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ConfigHolder.java (Logical) client config: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ClientConfig.java All of the above classes can be in one file. Config change event subscription: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/NoCubes.java#L44-L51 Registering the config specs: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/NoCubes.java#L54-L55 About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
June 4, 20196 yr Author 1 hour ago, Cadiboo said: Use the new toml config system. It’s separated based on logical side. Config value holders class: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/Config.java “Baking” the configs: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ConfigHelper.java#L100-L135 Config objects holder class: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ConfigHolder.java (Logical) client config: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/config/ClientConfig.java All of the above classes can be in one file. Config change event subscription: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/NoCubes.java#L44-L51 Registering the config specs: https://github.com/Cadiboo/NoCubes/blob/21969fd434c1711278fd7e1cf8e2f6126ef7b963/src/main/java/io/github/cadiboo/nocubes/NoCubes.java#L54-L55 How would I go to view a specific config file, say /configdir/somerandomdir/test.toml?
June 4, 20196 yr Client config is in .minecraft/config/<modid>-client.toml, server is in .minecraft/saves/<world>/serverconfig/<modid>-server.toml About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
June 4, 20196 yr Author That wasn't my question, my question was to access a custom config file set in a custom path/folder within the default config's folder. For example /modconfigfolder/randomfolder/someconfig.toml
June 4, 20196 yr No clue, probably don’t. I know that can change the name of the config somehow, if you really want to look into this that would be a good place to look at. Edited June 4, 20196 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
June 4, 20196 yr Author Just now, Cadiboo said: No clue, probably don’t. So basically if I wanted to access a folder of config files that follow the same schema that can be created by the user to be used ingame is currently not possible (at least not easily anyways)? Is there any chance of the 1.12 config system coming back, I found that to work quite well in design and usability
June 4, 20196 yr Why do you want multiple config files? About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
June 4, 20196 yr Author 29 minutes ago, Cadiboo said: Why do you want multiple config files? As in, I want my controller mod to be able to support controller mappings through config files. Basically make a config file inside a folder with all the mapping info in it and then in code read through that mapping file. Basically this but not just one mapping file, multiple for convenience.
June 4, 20196 yr modLoadingContext#registerConfig has a fileName parameter. You can probably use use the system file separator in that name About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
June 4, 20196 yr Author 7 hours ago, Cadiboo said: modLoadingContext#registerConfig has a fileName parameter. You can probably use use the system file separator in that name Is there any way to get the configuration directory without hard coding a string such as ".minecraft/config/mod/" and save it as a File instance? Edited June 4, 20196 yr by fernthedev
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.