Fix some errors if the config is unparseable. It should log an exception and carry on with defaults.

This commit is contained in:
Christian 2012-09-24 23:03:31 -04:00
parent a776afe1bf
commit 76f3b26aa3

View file

@ -577,10 +577,20 @@ public class ForgeChunkManager
chunkConstraints.put(mod, modCPT.getInt(25));
}
}
catch (Exception e)
{
FMLLog.log(Level.SEVERE, e, "A critical error occured reading the forgeChunkLoading.cfg file, defaults will be used");
}
finally
{
config.save();
if (dormantChunkCache == null)
{
dormantChunkCache = CacheBuilder.newBuilder().maximumSize(0).build();
FMLLog.info("Configured a dormant chunk cache size of 0");
}
}
}
/**