Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

1.13.2 By upgrading
FMLPreInitializationEvent. GetSuggestedConfigurationFile ()
I can not use it.
Is there any other way to get the path of the config file?

  • Author

This is because MOD designed for 1.12 uses the path to the config file and if we can acquire the path, we thought that we could minimize the work to support 1.13.

  • 3 months later...

Like @tokuhausu, I am also trying to port an older mod.

@diesieben07 would it be possible to provide any pointers to where the overhauled configuration system is described or implemented?

The update notes for mod creators do not mention this.

 

Thank you.

It changed from .cfg to .toml and now uses a proper library (electronwill’s nightconfig library with a wrapper for comments and syncing). It was also cleaned up a lot. Configuration doesn’t exist anymore and @Config hasn’t been ported yet. Here’s the commit in which I add an example config to my example mod https://github.com/Cadiboo/Example-Mod/commit/43db50e176d758ade2338764d7e2fe1b63aae7dd

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

On 6/19/2019 at 3:06 AM, Cadiboo said:

It changed from .cfg to .toml and now uses a proper library (electronwill’s nightconfig library with a wrapper for comments and syncing). It was also cleaned up a lot. Configuration doesn’t exist anymore and @Config hasn’t been ported yet. Here’s the commit in which I add an example config to my example mod https://github.com/Cadiboo/Example-Mod/commit/43db50e176d758ade2338764d7e2fe1b63aae7dd

 

Hi,

 

Thanks for posting your example mod! its a real help since forge decided to change everything, however, looking through your code I couldn't figure out how it actaully is you access the values stored in the config? Like how do i determine whether "clientBoolean" is true or false?

 

Thanks!

 

UPDATE:

 

Sorry, I figured out how to get it. However, When i change the file with MC open, the value does not change when im retrieving it. Is this intentional, or am I meant to be doing something else? I did notice that the setValueAndSave() function is never used.

 

Thanks again!

Edited by Vistaf
Update

The values in the ExampleModConfig class are the “baked” values from the config. They are the runtime representations of the config values (because looking them up each time you use them is expensive) and shouldn’t be changed from outside the “bakeConfig” method. Making them only accessible through getters would be good encapsulation. However, config saving is asynchronous (it happens on another thread) so if you want the correct value that you just set immediately, you’ll need to update it in code yourself. 

 

Edit: I’ll try n find an example

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.