From 353885bc9473b826eccd2f3c61bdfa385869500c Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Fri, 23 Mar 2012 11:41:16 -0700 Subject: [PATCH] Removed createCategory() function and changed it to create categories as they are encountered. --- .../net/minecraft/src/forge/Configuration.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/forge/forge_common/net/minecraft/src/forge/Configuration.java b/forge/forge_common/net/minecraft/src/forge/Configuration.java index 824bc9fe7..b8ef22a21 100755 --- a/forge/forge_common/net/minecraft/src/forge/Configuration.java +++ b/forge/forge_common/net/minecraft/src/forge/Configuration.java @@ -61,15 +61,7 @@ public class Configuration categories.put(CATEGORY_BLOCK, generalProperties); categories.put(CATEGORY_ITEM, itemProperties); } - - /** - * Creates a new category, call before calling load(). - * @param category The category name - */ - public final void createCategory(String category){ - categories.put(category.toLowerCase(), new TreeMap()); - } - + /** * Helper for depreciated functions */ @@ -188,7 +180,8 @@ public class Configuration Map source = categories.get(category); if(source == null){ - throw new RuntimeException("unknown section " + category); + source = new TreeMap(); + categories.put(category, source); } if (source.containsKey(key)) @@ -273,7 +266,8 @@ public class Configuration currentMap = categories.get(scopeName); if (currentMap == null) { - throw new RuntimeException("unknown section " + scopeName); + currentMap = new TreeMap(); + categories.put(scopeName, currentMap); } break;