Posted January 19, 20196 yr Trying to figure out best way to access Config file variables from code when subcategories are used... (using @Config annotation per Forge). Below is their example of how to make subcategories, however, there seems to be some access issues with this @Config(modid = "modid") public class Configs { public static SubCategory subcat = new SubCategory(); private static class SubCategory { public boolean someBool; public int relatedInt; } } Anyone have a good example of how they are doing this using the @config way Thanks all!
January 20, 20196 yr 12 hours ago, cptcorndog said: there seems to be some access issues with this What are the issues? here is an example of a working sub category https://github.com/Cadiboo/Example-Mod/blob/4ed728a75815285c6382420832a1b671142e60c4/src/main/java/io/github/cadiboo/examplemod/config/ModConfig.java 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)
January 20, 20196 yr Author Thank you that's exactly what I've done. For some reason, the forge example is making the subcategory class private which makes it more cumbersome to access from main code
January 20, 20196 yr Make it public? 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)
January 20, 20196 yr Author 1 minute ago, Cadiboo said: Make it public? Yup, on it, just thought I was missing something obvious for it to be otherwise
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.