-
Notifications
You must be signed in to change notification settings - Fork 0
mod.bt.Binds
The Binds class is the main class for Bind Tweaker. Using the Binds class, you can create custom binds, bind menus, and get existing binds.
void printBinds();
This will print all registered binds to the CT log and what key they are bound to.
Keybind createBind(String description, int keycode, String category); Creates a custom keybind using a description (name), a keycode, and a category. The description and category can both be localized in language files. The keycode is an int that corresponds to a keyboard key. A mapping of int value to key can be found on the Minecraft Wiki. It returns a KeyBindWrapper.
void createBindMenu(String name, Keybind... binds); Creates a bind menu using a name and a Keybind array. A keybind menu is a gui with the option to select a binding to trigger. Although the amount of keybinds in a menu can be as many as you want, I suggest not to do more than 5.
Keybind getKeybind(String description); Retrieves a keybind using its description. The description of keybinds can be found using the print binds method (at the top of the page).