From 76f3b26aa3f9ee2b8eb1fe81b567cc1f5db80567 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 24 Sep 2012 23:03:31 -0400 Subject: [PATCH] Fix some errors if the config is unparseable. It should log an exception and carry on with defaults. --- .../net/minecraftforge/common/ForgeChunkManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/net/minecraftforge/common/ForgeChunkManager.java b/common/net/minecraftforge/common/ForgeChunkManager.java index 6968a0eee..8092a9a83 100644 --- a/common/net/minecraftforge/common/ForgeChunkManager.java +++ b/common/net/minecraftforge/common/ForgeChunkManager.java @@ -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"); + } } + } /**