mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-06-07 16:34:03 +02:00
Fix unreleased refactor breaking keybind serialization
This commit is contained in:
parent
a2c9fd3c4b
commit
dae0eb4b25
@ -29,11 +29,15 @@ public final class Key{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String writeBinding(final KeyBinding binding){
|
public static String writeBinding(final KeyBinding binding){
|
||||||
return binding.getTranslationKey();
|
return binding.getBoundKeyTranslationKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void readBinding(final KeyBinding binding, final String serialized){
|
public static void readBinding(final KeyBinding binding, final String serialized){
|
||||||
|
try{
|
||||||
bind(binding, InputUtil.fromTranslationKey(serialized));
|
bind(binding, InputUtil.fromTranslationKey(serialized));
|
||||||
|
}catch(final IllegalArgumentException e){
|
||||||
|
e.printStackTrace(); // let's not crash if the config file has garbage, okay?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static InputUtil.Key inputFromMouse(final int button){
|
public static InputUtil.Key inputFromMouse(final int button){
|
||||||
|
Loading…
Reference in New Issue
Block a user