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.

Cryoexn

Members
  • Joined

  • Last visited

  1. Thank you very much. This helped alot!
  2. Hello, I was wondering what the current standard for implementing config files into mods. I am unable to find any tutorials or documentation on how to implement a config (.cfg) file. If anyone is able to point me to a tutorial or documentation page that I overlooked it would be greatly appreciated. Thank you for your time!
  3. Cryoexn joined the community
  4. Hello Forge Community, I am relatively new to modding so please be patient, also I apologize if I make beginner mistakes. Currently I'm re-writing a 1.8.9 HUD mod that would display various text and items to the screen. When I wrote the original mod I didn't follow config file conventions, because I was more focused on making my first mod. But now I would like to understand the convention and the correct way of using ".cfg" files. I have been googling to see if others have any tutorials, or have asked on the forums about config files but I cant find any up to date resources (I'm not sure what the latest config convention is). My Goal: What I am trying to accomplish is, be able to read in values from a config file such as (int x, int y, boolean enabled, String name, int color) for different HUD sub-mods. Then update them via chat commands and save them to the config file again. I am willing to write this mod in 1.16.x if the config implementation has been upgraded since 1.12.2 and would appreciate any information/tutorials for doing so. Steps I've Taken: I began with the Forge Documentation but was unable to see any information of config files for 1.16.x , I might have been just looking in the wrong place. I did look back at the 1.12.x Documentation and found config annotations. (I also followed the link to the annotation testing GitHub repo) When I made an attempt to implement these I was able to create a "ModConfig.java" that created a ".cfg" file that was correctly structured for how it was defined, but I was unable to update the values and save them to the config file when running the mod. I was using `ConfigManager.sync(MODID, Type.INSTANCE)` to attempt to write the updated values to the file but It would overwrite the values in the code before saving, I think this is due to me modifying it by just setting the fields and not using GUI but I'm not sure. I appreciate any and all help on this topic and if you require more information I can provide it. Thank you in advance for your time! Files: Here is the mod entry point file ->"CryoHudMod.java", and my config annotated file -> "ModConfig.java", and the generated "cryo-hud-mod.cfg".

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.