Jump to content

Two Tutorial Requests


pro-mole

Recommended Posts

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.

Link to comment
Share on other sites

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.

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.

Link to comment
Share on other sites

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.

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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.

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.