示例#1
0
 @Override
 public void registerKeys() {
   KeyBindings.addKeyBinding(KeyBindingHandler.Key_ToolMode);
   KeyBindings.addIsRepeating(false);
   KeyBindings.addKeyBinding(KeyBindingHandler.Key_LockTool);
   KeyBindings.addIsRepeating(false);
   // ClientRegistry.registerKeyBinding(KeyBindingHandler.Key_ToolMode);
   // ClientRegistry.registerKeyBinding(KeyBindingHandler.Key_LockTool);
   uploadKeyBindingsToGame();
 }
示例#2
0
 @Override
 public void uploadKeyBindingsToGame() {
   GameSettings settings = Minecraft.getMinecraft().gameSettings;
   KeyBinding[] tfcKeyBindings = KeyBindings.gatherKeyBindings();
   KeyBinding[] allKeys = new KeyBinding[settings.keyBindings.length + tfcKeyBindings.length];
   System.arraycopy(settings.keyBindings, 0, allKeys, 0, settings.keyBindings.length);
   System.arraycopy(
       tfcKeyBindings, 0, allKeys, settings.keyBindings.length, tfcKeyBindings.length);
   settings.keyBindings = allKeys;
   settings.loadOptions();
 }