mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fixed property losing state after rename. (#4123)
This commit is contained in:
1 parent
274dfc23ef
commit
7d333eb100
2 files changed
+84
-3
No files matched your search
@@ -1412,10 +1412,12 @@ public class Configuration
|
||||
{
|
||||
if (hasCategory(category))
|
||||
{
|
||||
if (getCategory(category).containsKey(oldPropName) && !oldPropName.equalsIgnoreCase(newPropName))
|
||||
ConfigCategory cat = getCategory(category);
|
||||
if (cat.containsKey(oldPropName) && !oldPropName.equalsIgnoreCase(newPropName))
|
||||
{
|
||||
get(category, newPropName, getCategory(category).get(oldPropName).getString(), "");
|
||||
getCategory(category).remove(oldPropName);
|
||||
Property prop = cat.remove(oldPropName);
|
||||
prop.setName(newPropName);
|
||||
cat.put(newPropName, prop);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user