Jump to content

Recommended Posts

Posted

Hi everyone, :)

I wanted to ask if there is a way to know if Minecraft is being closed using Forge... is there an event or something? I made a quick search without finding what I was searching for :-\ ... I simply need to shutdown some libraries at exit.

Oh, and, by the way, maybe someone has some more experience in Java Native Interface, and can help me; here is my question: can I know when an object is collected by the garbage collector?

Thanks, BuildLight

 

Everything is for my mod Web Displays.

Follow me on Twitter @BuildLight_

Posted

Hi BuildLight :)

 

First question: I don't know whether it exists or not. (FMLServerStoppingEvent probably isn't what you look for)

Second question: No, you can't tell, but for each object, the garbage collector calls finalize() during the process, so you can add things in it that you want to be done at that point (don't forget to call super.finalize() at the end then)

Posted
Oh, and, by the way, maybe someone has some more experience in Java Native Interface, and can help me; here is my question: can I know when an object is collected by the garbage collector?

Thanks, BuildLight

 

this ... this question is so beautifull ....:')

 

its nice to see a change from "hurr durr im 8 and i want to make mod ,whats an int ?"

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Hi BuildLight :)

 

First question: I don't know whether it exists or not. (FMLServerStoppingEvent probably isn't what you look for)

Second question: No, you can't tell, but for each object, the garbage collector calls finalize() during the process, so you can add things in it that you want to be done at that point (don't forget to call super.finalize() at the end then)

Hi,

Nah FMLServerStoppingEvent is not what i'm searching... but instead I found an interesting thing: Runtime.getRuntime().addShutdownHook(....) I'm sure that will help me :P

And thanks for the finalize() function, it's working like expected ^^

Thanks a lot again, BuildLight.

Follow me on Twitter @BuildLight_

Posted

oh ...my ... god, your mod is sooo cool :D

 

i mean i would probably never use it because it would be super slow (well maybe i can think of cool stuff to do with it)

 

but holy that is one of the coolest idea ever !

 

edit: attend en plus tes francais ?!?!?! ok la cest bin trop cool !

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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