Jump to content

[1.7.2] Configuration Setup help


Electrobob99

Recommended Posts

Basically what I'm asking is this, how exactly do I make my mod generate/create a config file in the proper place, i.e the config folder. Never found a proper tutorial for such :(

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Ok, I will look into it. Ok, now I have another question. You see, I'm trying to make a custom TallGrassblock drop an item similar to how vanilla tall grass drops seeds. Any help is appreciated.

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Well, luckily I found how to make it work utilizing code from the vanilla tallgrass :) But I didn't copy paste it. I typed it by hand, and learned from it, basically I made getItemDropped return null, utilized quanityDroppedWithBonus, and used the getDrops ArrayList to do the drop for my tallgrass like block... And all I really had to change in that was the representation of the "seed" variable xD

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Ok, I have now begun making a config file which generates correctly, but I want to try to make it a bit more customized=, like custom categories and such. Any help?

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Ok, I have now begun making a config file which generates correctly, but I want to try to make it a bit more customized=, like custom categories and such. Any help?

 

Post exactly what you would like to do and what code you've tried so far.  It is difficult to help with general questions, because my answer to your current question is "just create custom categories and use them".

 

Anyway, the one general hint I'd give is look at the Configuration class and look at all the public methods.  You'll see some things there that might be related to your interest.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Basically what I want to do is, make it look different, change it's design. Like lets say I don't want it to start looking like this:

 

# Configuration file

####################
# block
####################

And change how this are presented, it's a bit hard to explain to be honest, especially when I have know plan. Mainly going to use this config to disable certain parts of my mod, and possibly have new categories, and I think I have found what I need in the Configuration class to make new categories, but I don't know if it's right or not. 

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Okay, I generally follow this tutorial: http://www.minecraftforge.net/wiki/How_to_make_an_advanced_configuration_file

 

You'll see in the "Basic Property Creation and Usage" section that there are advanced methods where you can specify the category when accessing the property, and I think you just need to create your custom ConfigCategory instance prior to using those methods.

 

Not certain but something like:

String myCategoryName = "myCategory";
ConfigCategory myConfigCategory = new ConfigCategory(myCategoryName);
boolean isThisTrue = config.get(myCategoryName, "IsThisTrue", true).getBoolean(true);

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.