Jump to content

Using "config" button in Mods menu


its_meow

Recommended Posts

In the mods menu under each mod, there's a "config" button that lets you edit configs on mods with it working (Forge, for example)

 

How do I use this in my mod, since it's just blacked out by default? I plan to add more config options and want to make this work.

Link to comment
Share on other sites

If you're using the new @Config annotation-based system, a config GUI will automatically be created for you.

 

If you're using the Configuration class and specifying the properties yourself, you need to create a class that implements IModGuiFactory and specify it in the guiFactory property of your @Mod annotation. In the IModGuiFactory#createConfigGui implementation, you need to create and return an instance of GuiConfig with the top-level IConfigElements.

 

You can see an example of the new system here.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Is there any reason I was banned from my old account? I don't understand how posting this thread and reporting some spam results in a ban. Anyone?

Link to comment
Share on other sites

14 hours ago, V0idWa1k3r said:

Here is a tutorial. It is a bit outdated but should work for the most part.

Apart from that forge itself contains an example.

Or you can see the example for JEI - mod, factory and gui

 

Thank you! I got it working.

Link to comment
Share on other sites

  • 5 years later...

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.