Added keyboard shortcuts to NEI

This commit is contained in:
slprime committed 2022-08-13 21:52:43 +03:00
1 parent 529f4374d6
commit 4054ea04f3
30 files changed
+706 -281

No files matched your search

@@ -171,6 +171,16 @@ public class API {
addOption(new OptionKeyBind(ident));
}
/**
* Add a custom KeyBinding to be configured in the Controls menu.
* @param ident An identifier for your key, eg "shoot"
* @param defaultKey The default value, commonly obtained from {@link Keyboard}
*/
public static void addHashBind(String ident, int defaultKey) {
NEIClientConfig.setDefaultKeyBinding(ident, defaultKey);
addOption(new OptionKeyBind(ident, true));
}
public static void addOption(Option option) {
NEIClientConfig.getOptionList().addOption(option);
}