When your world doesn't load anymore (small tip)

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
Hi all, not sure if this is the right place to post this but I thought I'd share a small tip which saved me a lot of work this morning. And also this isn't the first time I was able to use this trick.

Sometimes when Minecraft crashes it fails to correctly write back the world and in that situation it is possible that it can no longer load the game. In one particular case of this the world isn't even listed anymore in your list of worlds to load. And that's a good thing because in that situation there is usually a good solution.

What happened in my case at least was that 'level.dat' in the save folder didn't exist. So the save folder is not recognized as a valid world which is why Minecraft will not show it in the list of worlds. There are two possible ways to solve this:
  1. There is a level.dat_old in the same directory. Making a copy of that to 'level.dat' might possibly restore your world. In my case this morning it didn't however so I guess this file was corrupted too.
  2. Luckily I had a backup of my entire world from only a day old. So I could of course restore my entire world but then everything I did this morning would be lost. Instead I only copied 'level.dat' from that backup. This way I could again load my world and nothing I did was lost. The only thing is that your inventory will be restored to how it was at the time of the backup. So possibly you might have to cheat in a few items or remove a few items that you used since then.
So, just wanted to share this for people who don't know this yet.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
If stability is your goal, then ALWAYS run SMP. A server is immune to client sided bugs, which do constitute a vast majority of mod bugs, so you can frequently simply reconnect after a crash. Even if it does fault, the server seems more robust and the process tends not to terminate midway through a critical operation (such as saving).
 

ThatOneSlowking

New Member
Jul 29, 2019
3,520
0
0
Hi all, not sure if this is the right place to post this but I thought I'd share a small tip which saved me a lot of work this morning. And also this isn't the first time I was able to use this trick.

Sometimes when Minecraft crashes it fails to correctly write back the world and in that situation it is possible that it can no longer load the game. In one particular case of this the world isn't even listed anymore in your list of worlds to load. And that's a good thing because in that situation there is usually a good solution.

What happened in my case at least was that 'level.dat' in the save folder didn't exist. So the save folder is not recognized as a valid world which is why Minecraft will not show it in the list of worlds. There are two possible ways to solve this:
  1. There is a level.dat_old in the same directory. Making a copy of that to 'level.dat' might possibly restore your world. In my case this morning it didn't however so I guess this file was corrupted too.
  2. Luckily I had a backup of my entire world from only a day old. So I could of course restore my entire world but then everything I did this morning would be lost. Instead I only copied 'level.dat' from that backup. This way I could again load my world and nothing I did was lost. The only thing is that your inventory will be restored to how it was at the time of the backup. So possibly you might have to cheat in a few items or remove a few items that you used since then.
So, just wanted to share this for people who don't know this yet.
Even better tip: BACK IP YOUR WORLD
 

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
Even better tip: BACK IP YOUR WORLD

Yes I do that every day. But even then I was happy I didn't have to lose a few hours of work.[DOUBLEPOST=1401692954][/DOUBLEPOST]
If stability is your goal, then ALWAYS run SMP. A server is immune to client sided bugs, which do constitute a vast majority of mod bugs, so you can frequently simply reconnect after a crash. Even if it does fault, the server seems more robust and the process tends not to terminate midway through a critical operation (such as saving).

What about memory requirements for both a server and client in case you don't have access to another computer?
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
What about memory requirements for both a server and client in case you don't have access to another computer?

That is a good point. But: Minecraft runs SSP games against an internal server anyway, so this just splits the memory into two processes. The OS generally (sadly) seems much better at managing memory than Java. Also, the server generally has far lower memory requirements than the client (with just one player connected) as it doesn't have any of the texture memory overhead. So I'd not expect a problem, unless you are playing on a machine that is already having memory pressure issues.
 

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
That is a good point. But: Minecraft runs SSP games against an internal server anyway, so this just splits the memory into two processes. The OS generally (sadly) seems much better at managing memory than Java. Also, the server generally has far lower memory requirements than the client (with just one player connected) as it doesn't have any of the texture memory overhead. So I'd not expect a problem, unless you are playing on a machine that is already having memory pressure issues.

Ok, so what should I set the memory flags too then? I'm currently using 2800 megs for my java client. I have 8 gig total memory.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
Ok, so what should I set the memory flags too then? I'm currently using 2800 megs for my java client. I have 8 gig total memory.

I am very conservative with my java flags and tend not to set them at all except to fix an out-of-memory issue. All I can say is that the server will need the same MaxPermGen setting as the client, and setting the server's xmx to 2Gb on your system would probably be appropriate.

8GB of system ram is more than enough to host both a minecraft client and full server instance. I run a small server for about 4 people on a box just like that with no perceptible problems at all.

--

One small caveat is that some mods with client only effects are not Server compatible. i.e. Damage Indicators, Bspkrs HUD mods, voxel/zans minimap do not need to be in the servers mod folder, and in some cases will cause the server to not start if they are.
 
Last edited:
  • Like
Reactions: McJty