pro-mole Posted October 29, 2012 Posted October 29, 2012 These are two topics I was expecting to find tutorials about, but actually didn't find much documentation. Granted, I didn't search THAT much, but I supposed it'd be more easily accessible. These are A) mcmod.info files and B) those handy forge configuration files. Quote
Viper283 Posted October 29, 2012 Posted October 29, 2012 check my github for config files, look at GenConfig and FMAConfiguration Quote
LordFokas Posted October 29, 2012 Posted October 29, 2012 Actually, if you check Viper's github, you'll find a class that is a cheap custom ripoff of Forge's Configuration class. Just compare it with Forge's. All you need to use is a few functions from the Configuration class, not create a huge class to do what forge already does for you. There was a great tutorial on that, I think it was part of the Generic Mod tutorial, look for it on forge tutorials in the forum index. For mcmod.info, try opening forge's own mcmod.info, I found it pretty explanatory. Quote Did I help? Hitting 'Thank You' would be appreciated. Soon, the lost city will rise from the bottom of the ocean, and spread it's technology across Minecraft.
Viper283 Posted October 29, 2012 Posted October 29, 2012 -snip- it may be a copy of forges version, but it works in the exact same way, and can be used in the same manner, i only copied the code so that i can edit the file how i want, without making any changes to forge and vanilla code Quote
LordFokas Posted October 29, 2012 Posted October 29, 2012 And that makes it a good excuse to show people your square version of the wheel? If you don't have code that does what people want, you don't show it. Still, if you know how to do that, you can tell them, and if you don't know, you don't say a thing. Now, every time someone has a problem, you send them to your github, showing off your code, where you proudly reinvent the [square] wheel. And that, kind sir, is not acceptable. In this particular case, this guy wanted something that is a 5 line solution, and you pointed him to a 525 line file and a class that does nothing besides creating an instance of another class. @pro_mole: this is an adaptation from the code I use: @PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile())); config.load(); int block_id = config.get(Configuration.CATEGORY_BLOCK, "property_name", default_block_id).getInt(); config.save(); } If you have any doubts, feel free to ask me. I'll gladly help. Quote Did I help? Hitting 'Thank You' would be appreciated. Soon, the lost city will rise from the bottom of the ocean, and spread it's technology across Minecraft.
luacs1998 Posted October 30, 2012 Posted October 30, 2012 https://github.com/cpw/fml/wiki/FML-mod-information-file There you go. Quote Read the EAQ before posting! OR ELSE! This isn't building better software, its trying to grab a place in the commit list of a highly visible github project. www.forgeessentials.com Don't PM me, I don't check this account unless I have to.
LordFokas Posted October 30, 2012 Posted October 30, 2012 I was browsing the tutorial page today (considering making some tutorials) and I accidentally found what you need. Here: http://www.minecraftforge.net/wiki/How_to_make_an_advanced_configuration_file Quote Did I help? Hitting 'Thank You' would be appreciated. Soon, the lost city will rise from the bottom of the ocean, and spread it's technology across Minecraft.
pro-mole Posted October 30, 2012 Author Posted October 30, 2012 Ok-o, the mcmod files are great help. Maybe document that later. Also, thanks for the configuration tutorial. I saw that one before, but I didn't think "advanced" was what I was looking for. Quote
LordFokas Posted October 30, 2012 Posted October 30, 2012 Nah, it's actually pretty basic The code behind that is advanced stuff, but you don't need to know how it works, just what methods from what classes you need to call. Quote Did I help? Hitting 'Thank You' would be appreciated. Soon, the lost city will rise from the bottom of the ocean, and spread it's technology across Minecraft.
Recommended Posts
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.