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

Hello,

 

I have a configuration file from wich I can read my entries , and set new ones , but how can I modifiy entires , because I only found the config.get[params] to edit , but it just creates a new one , or changes the default state , so again my question is how can you edit a property in configs from your mod ?

 

THanks to anyone having an answer to this simple question

	Configuration config = new Configuration(event.getSuggestedConfigurationFile(), true);

	config.load();
	config.get("Booleans", "Boolean1", false).set(true);
	config.save();

Kain

Yes.  If you use a get method like getBoolean() it will just get a boolean value which you can't of course use to set, but if you use the get() method you get the Property from the file and from that you can further set it.

 

Note that you're asking about this because you want users to be able to change the config options, you should consider the new Forge config GUI functionality.  Basically it creates a standardized options setting interface.  There is tutorial here:  http://minalien.com/minecraft-forge-feature-spotlight-config-guis/

 

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

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.