[1.10] Fix keys with KeyModifier failing to load (#3018)
Fix key options with KeyModifier failing to load due to NumberFormatException
This commit is contained in:
parent
cc593f3939
commit
90d6bad7f7
1 changed files with 4 additions and 4 deletions
|
@ -24,18 +24,18 @@
|
|||
try
|
||||
{
|
||||
if (!this.field_74354_ai.exists())
|
||||
@@ -887,6 +890,11 @@
|
||||
@@ -886,6 +889,11 @@
|
||||
{
|
||||
if (s1.equals("key_" + keybinding.func_151464_g()))
|
||||
{
|
||||
keybinding.func_151462_b(Integer.parseInt(s2));
|
||||
+ if (s2.indexOf(':') != -1)
|
||||
+ {
|
||||
+ String[] t = s2.split(":");
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(t[1]), Integer.parseInt(t[0]));
|
||||
+ }
|
||||
+ } else
|
||||
keybinding.func_151462_b(Integer.parseInt(s2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1016,7 +1024,8 @@
|
||||
|
||||
for (KeyBinding keybinding : this.field_74324_K)
|
||||
|
|
Loading…
Reference in a new issue