Merge branch '1.9.4'

This commit is contained in:
cpw committed 2016-05-31 00:34:03 -04:00
commit caa61e1be9
332 files changed
+3806 -3131

No files matched your search

@@ -117,7 +117,7 @@ public class Configuration
File fileBak = new File(file.getAbsolutePath() + "_" +
new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()) + ".errored");
FMLLog.severe("An exception occurred while loading config file %s. This file will be renamed to %s " +
"and a new config file will be generated.", file.getName(), fileBak.getName());
"and a new config file will be generated.", file.getName(), fileBak.getName());
e.printStackTrace();
file.renameTo(fileBak);
@@ -691,11 +691,6 @@ public class Configuration
*/
public Property get(String category, String key, String defaultValue, String comment, Property.Type type)
{
if (!caseSensitiveCustomCategories)
{
category = category.toLowerCase(Locale.ENGLISH);
}
ConfigCategory cat = getCategory(category);
if (cat.containsKey(key))
@@ -739,11 +734,6 @@ public class Configuration
*/
public Property get(String category, String key, String[] defaultValues, String comment, Property.Type type)
{
if (!caseSensitiveCustomCategories)
{
category = category.toLowerCase(Locale.ENGLISH);
}
ConfigCategory cat = getCategory(category);
if (cat.containsKey(key))
@@ -783,11 +773,15 @@ public class Configuration
public boolean hasCategory(String category)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
return categories.get(category) != null;
}
public boolean hasKey(String category, String key)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
ConfigCategory cat = categories.get(category);
return cat != null && cat.containsKey(key);
}
@@ -909,6 +903,8 @@ public class Configuration
if (tmpList != null) // allow special characters as part of string lists
break;
name = line.substring(nameStart, nameEnd + 1);
if (!caseSensitiveCustomCategories)
name = name.toLowerCase(Locale.ENGLISH);
String qualifiedName = ConfigCategory.getQualifiedName(name, currentCat);
ConfigCategory cat = categories.get(qualifiedName);
@@ -1122,6 +1118,9 @@ public class Configuration
public ConfigCategory getCategory(String category)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
ConfigCategory ret = categories.get(category);
if (ret == null)
@@ -1191,8 +1190,6 @@ public class Configuration
*/
public Configuration setCategoryComment(String category, String comment)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setComment(comment);
return this;
}
@@ -1210,8 +1207,6 @@ public class Configuration
*/
public Configuration setCategoryLanguageKey(String category, String langKey)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setLanguageKey(langKey);
return this;
}
@@ -1230,9 +1225,6 @@ public class Configuration
*/
public Configuration setCategoryConfigEntryClass(String category, Class<? extends IConfigEntry> clazz)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setConfigEntryClass(clazz);
return this;
}
@@ -1244,8 +1236,6 @@ public class Configuration
*/
public Configuration setCategoryRequiresWorldRestart(String category, boolean requiresWorldRestart)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setRequiresWorldRestart(requiresWorldRestart);
return this;
}
@@ -1258,8 +1248,6 @@ public class Configuration
*/
public Configuration setCategoryRequiresMcRestart(String category, boolean requiresMcRestart)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setRequiresMcRestart(requiresMcRestart);
return this;
}
@@ -1270,8 +1258,6 @@ public class Configuration
*/
public Configuration setCategoryPropertyOrder(String category, List<String> propOrder)
{
if (!caseSensitiveCustomCategories)
category = category.toLowerCase(Locale.ENGLISH);
getCategory(category).setPropertyOrder(propOrder);
return this;
}