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.

How can I restart forge after installing a mod to the mods folder while running?

Featured Replies

Posted

If my mod downloads another mod to the mods folder, how can I restart the forge start up process to start the mod?

I'm working on something big!  As long as there arent alot of big issues... [D

1. Any program that downloads code is potentially dangerous to user - especially if that would be Mod that would download another mod from URL that can be quite easily exploited.

 

2. If you think that method like "Load this mod for me right now" exists - I think you don't understand how mods work, or Java for that matter.

 

3. Best and safest way is to simply restart game (you could display msg saying to do that).

If you don't want that - you will have to dive into ClassLoaders.

 

3.1. Let's say reloading mod (as in load same mod but with changed stuff) is rather impossible (runtime nightmare).

3.2. Loading totally separate classes is actually possible (you can pretty much use normal Java to do that).

3.3. Refering to 3.2. - you could probably use some of Forge code to do the loading for you, but hell - that is some piece of work. Also - there are things that simply cannot be loaded on runtime, for one you shouldn't really touch registry or replace anything that is alredy loaded.

 

Where to look? In Forge packages (Mod discovery processes and callbacks for init methods) and ClassLoader tutorials.

 

Opinion: Don't do it.

1.7.10 is no longer supported by forge, you are on your own.

  • Author

1. Any program that downloads code is potentially dangerous to user - especially if that would be Mod that would download another mod from URL that can be quite easily exploited.

 

2. If you think that method like "Load this mod for me right now" exists - I think you don't understand how mods work, or Java for that matter.

 

3. Best and safest way is to simply restart game (you could display msg saying to do that).

If you don't want that - you will have to dive into ClassLoaders.

 

3.1. Let's say reloading mod (as in load same mod but with changed stuff) is rather impossible (runtime nightmare).

3.2. Loading totally separate classes is actually possible (you can pretty much use normal Java to do that).

3.3. Refering to 3.2. - you could probably use some of Forge code to do the loading for you, but hell - that is some piece of work. Also - there are things that simply cannot be loaded on runtime, for one you shouldn't really touch registry or replace anything that is alredy loaded.

 

Where to look? In Forge packages (Mod discovery processes and callbacks for init methods) and ClassLoader tutorials.

 

Opinion: Don't do it.

 

ok then, ill just add a GUI prompt for the user to restart on their own, thanks for the feedback!

I'm working on something big!  As long as there arent alot of big issues... [D

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.