Jump to content

[1.10.2][CLOSED] How to stop all minecraft at once without extra log lines


Recommended Posts

Posted

So.. Yeah... I dont like just saying "read title" because its rude in my opinion...

 

How would I stop the whole proccess without any thinking and extra log lines...

(I feel like i need to mention that this is planned to occur at PreInit in spesific conditions..)

Doing stuff n' things

Posted

So.. Yeah... I dont like just saying "read title" because its rude in my opinion...

 

How would I stop the whole proccess without any thinking and extra log lines...

(I feel like i need to mention that this is planned to occur at PreInit in spesific conditions..)

What do you mean stop the whole process? Why would you do this?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I want under a condition to just crash the game without the stacktrace stuff and exit codes and all of that...

I don't understand the purpose but your could try System.exit(0);

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I want under a condition to just crash the game without the stacktrace stuff and exit codes and all of that...

I don't understand the purpose but your could try System.exit(0);

 

The SecurityManager no longer allows for mods to use System.exit.

If my post helped you, please press that "Thank You"-button to show your appreciation.

 

Also if you don't know Java, I would suggest you read the official tutorials by Oracle to get an idea of how to do this. Thanks, and good modding!

 

Also if you haven't, set up a Git repo for your mod not only for convinience but also to make it easier to help you.

Posted

I want under a condition to just crash the game without the stacktrace stuff and exit codes and all of that...

I don't understand the purpose but your could try System.exit(0);

 

The SecurityManager no longer allows for mods to use System.exit.

Ok then I don't see why Forge has blocked that from being accessed from Mods but I guess they had a reason.

 

I want under a condition to just crash the game without the stacktrace stuff and exit codes and all of that...

I don't understand the purpose but your could try System.exit(0);

Instead use

Minecraft.getMinecraft().shutdown();

This sets a boolean to false stopping the main Game Loop and eventually stops the thread of Minecraft.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Instead use

Minecraft.getMinecraft().shutdown();

This sets a boolean to false stopping the main Game Loop and eventually stops the thread of Minecraft.

I did use it first but it gave alot of log lines, That's why I came to here..

 

I would try:

FMLCommonHandler.instance().exitJava(0, true/false)

Thank you! works perfectly!

Setting the boolean to false seems to produce less lines so its false for me I guess..

Unless its a really super duper importent that its set to true...

 

Also, What's the effect of the exit code? In modded I've seen some times -1 and 0s.. But Idk what they mean...

Doing stuff n' things

Posted

It's a return value from main. Generally speaking "0" means "everything's fine" while other values are some variant of an error.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

This is the exact reason we added the security manager, so that people CAN'T exit minecraft "without extra log lines"

If minecraft closes, you NEED to know why.

And if any mod is trying to HIDE from explaining why then that is a shit mod and should never be release/encouraged.

 

We don't prevent the stop functionality, we just add a stacktrace so you know WHO stopped it.

Just use the systems in place.

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

Posted

This is the exact reason we added the security manager, so that people CAN'T exit minecraft "without extra log lines"

If minecraft closes, you NEED to know why.

And if any mod is trying to HIDE from explaining why then that is a shit mod and should never be release/encouraged.

 

We don't prevent the stop functionality, we just add a stacktrace so you know WHO stopped it.

Just use the systems in place.

 

I'm doing so to have a diffrent system for explaining the error that happened in the mod..

The stacktrace is nice for modders and developers but it has no use for the avrage player...

My system is explaining why it crashed with a detailed information and telling the player where he could go for help....

 

Although I am using stacktrace while modding, While playing, It burries all the codes that explain why......

And in the run I never want the player to be confused as to why he cant load minecraft because he doesnt know how to read properly the stacktrace and the vanilla error...

 

 

In the end, I will make sure all of the errors that I know that might occur while playing will never cause a real crash...

Doing stuff n' things

Posted

Either way we dont support hiding the cause.

So you're out of luck, however just make your information as clear as possible as it will be printed directly above the trace.

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

Posted

then that is a shit mod and should never be release/encouraged.

And I dont know who you think you are to call a mod shit and say it should never be released or encouraged...

The idea of modding is allowing people to work creativly on whatever they want to do....

Doing stuff n' things

Posted

then that is a shit mod and should never be release/encouraged.

And I dont know who you think you are to call a mod shit and say it should never be released or encouraged...

The idea of modding is allowing people to work creativly on whatever they want to do....

I am LexManos, the lead developer of the most popular modding api for the Minecraft environment. I have over 4 years of experience working with Minecraft mods and the community. As well as over 20 years of development and modding experience in non-Minecraft realms. THAT is who I am.

 

The ability for mods to kill the client SILENTLY was removed because people like YOU abused it for egotistical and petty reasons which harmed the end user and purposefully sent users to the wrong place for the cause. I have NOT removed any functionality. I have NOT hindered any mod in any way. You can still stop the process of you wish. I simply force the log to capture the correct cause so that the end user, and us here doing support, know how to handle it.

  • Like 1

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

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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