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

So my mod has an auto updater that downloads a new jar file from the Internet and replaces the current one. I am wondering if it updates in game, if it will mess with the game or the effects only take place after restart.

 

By mess with the game, I mean start using the new jar file

Read about Java ClassLoader.

 

Answer is a simple NO (it won't).

 

Once classes are loaded nothing from outside changes them, only thing that can "mess" with anything is when you would reference .jar file directly and expect it to have something that it doesn't.

As to assets - they will probably get reloaded (from new .jar) when you'd reload resources, but I am not sure.

 

As to auto-reloading - it would be possible to reload whole .jar in runtime, but sadly MC/Forge are not designed to help you, so you probably can't.

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

So my mod has an auto updater that downloads a new jar file from the Internet
NEVER do that -.-

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

Read about Java ClassLoader.

 

Answer is a simple NO (it won't).

 

Once classes are loaded nothing from outside changes them, only thing that can "mess" with anything is when you would reference .jar file directly and expect it to have something that it doesn't.

As to assets - they will probably get reloaded (from new .jar) when you'd reload resources, but I am not sure.

 

As to auto-reloading - it would be possible to reload whole .jar in runtime, but sadly MC/Forge are not designed to help you, so you probably can't.

Ok, that's what I thought, good.

 

 

So my mod has an auto updater that downloads a new jar file from the Internet
NEVER do that -.-

 

It's not like automatic. It asks the player if they would like to update and if they say yes, then it replaces the jar file

 

 

Still not a good idea.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

meh. It seems that you don't like anything. :)
No I don't like anything that causes the end users frustration, mod pack creators to yell at me. Leaves open untold security holes as standard practice and is just plane annoying.

Do not download executable code and run it. Simple as that.

If users wanna take the risk of running random things then they should know what they are doing.

On top of that, what if you accidentally break something in an 'update' the headake would be enormous if it just instantly shipped to everyone.

 

This is one of those cases that you just have to defer to my 20+ years of experience on the subject. DO NOT DO IT.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.