Jump to content

Recommended Posts

Posted (edited)

Hello,

I have recently made a Config class using 

@Config

It generates and uses the config file just fine but i cant use the gui to edit it as there is no config button for my mod.  It's not just grayed out it isn't there at all.  Why is this happening and how can i fix it.

 

EDIT:

I have corrected the modid in the mcmod.info file and now the config mod exists but is grayed out.

I have heard mixed answers on whether or not the gui is auto generated for the config.  Does it generate it or do i have to use gui factory.

Edited by drok0920
Posted

Automatic config GUIs for the annotation-based config system were added in Forge 1.11.2-13.20.0.2262 (commit 25497d3). If you're using an older version, update to get the automatic config GUI.

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.

Posted

I'm not sure why it's not working for you. Please create a Git repository of your mod, push it to a site like GitHub (if you haven't already) and link it here.

 

See my mod and its .gitingore file for an example of the structure to use and which files to include.

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.

Posted (edited)

You specify a GUI factory in your @Mod annotation, so Forge doesn't use the default GUI factory for your mod. The GUI factory that you specify doesn't exist, so a ClassNotFoundException is logged and no GUI factory is registered for your mod.

 

Simply remove the GUI factory from your @Mod annotation and Forge will use the default GUI factory.

 

The ModConfig.Overrides class is never used for the config file/GUI because there's no field of that type in the top-level @Config class (ModConfig). Even if there was, the ModConfig.Overrides.fixedHarvest field wouldn't be used because only the top-level @Config class can have static fields, other classes need to have non-static fields.

 

I highly recommend learning how to use a local Git client rather than using GitHub's web interface. This will let you have finer control over what's in each commit so you can make sure each commit only consists of related changes and has a descriptive message.

 

I personally use GitKraken, but you can also use your IDE's integrated Git client or the git command-line.

Edited by Choonster

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.

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.