Java 类net.minecraftforge.client.settings.KeyConflictContext 实例源码

项目:JustEnoughButtons    文件:ClientProxy.java   
@Override
public void registerKeyBind() {
    ClientRegistry.registerKeyBinding(makeCopyKey);
    ClientRegistry.registerKeyBinding(hideAll);

    if (!Loader.isModLoaded(JEIButtons.MOD_MOREOVERLAYS) && !Loader.isModLoaded(JEIButtons.MOD_DYN_SOURROUND) && ConfigHandler.registerUtilKeybinds) {
        mobOverlay = new KeyBinding(Localization.KEY_MOBOVERLAY, KeyConflictContext.IN_GAME, Keyboard.KEY_F7, Localization.KEY_CATEGORY);
        chunkOverlay = new KeyBinding(Localization.KEY_CHUNKOVERLAY, KeyConflictContext.IN_GAME, Keyboard.KEY_F4, Localization.KEY_CATEGORY);

        ClientRegistry.registerKeyBinding(chunkOverlay);
        ClientRegistry.registerKeyBinding(mobOverlay);
    } else {
        JEIButtons.enableOverlays = false;
        JEIButtons.logInfo("MoreOverlays is loaded. Disabling Lightlevel and Chunk Overlay!");
    }
}
项目:Ambidextrous    文件:ClientSide.java   
public ClientSide()
{
    // just put them next to the original use item keybind.
    final String category = "key.categories.gameplay";

    ClientRegistry.registerKeyBinding( bindingOffHand = new KeyBinding( "mod.ambidextrous.offhand", KeyConflictContext.IN_GAME, 0, category ) );
    ClientRegistry.registerKeyBinding( bindingMainHand = new KeyBinding( "mod.ambidextrous.mainhand", KeyConflictContext.IN_GAME, 0, category ) );
}
项目:TODOList    文件:KeyBind.java   
public static void init(){
    MinecraftForge.EVENT_BUS.register(new KeyBind());
    openTodoList = new KeyBinding("openTodoList", KeyConflictContext.IN_GAME, Keyboard.KEY_COMMA, category);
    ClientRegistry.registerKeyBinding(openTodoList);
    openTodoListConfig = new KeyBinding("openTodoListConfig", KeyConflictContext.IN_GAME, KeyModifier.ALT, Keyboard.KEY_COMMA, category);
    ClientRegistry.registerKeyBinding(openTodoListConfig);
}
项目:Battlegear2    文件:BattlegearClientTickHandeler.java   
private BattlegearClientTickHandeler(){
    if(BattlegearConfig.enableGUIKeys) {
        battleInv = new KeyBinding("Battle Inventory", KeyConflictContext.IN_GAME, Keyboard.KEY_I, "key.categories.inventory");
        openSigilEditor = new KeyBinding("Open Sigil Editor", KeyConflictContext.IN_GAME, Keyboard.KEY_P, "key.categories.misc");
        ClientRegistry.registerKeyBinding(battleInv);
        ClientRegistry.registerKeyBinding(openSigilEditor);
    }else{
        battleInv = null;
        openSigilEditor = null;
    }
    drawWeapons = new KeyBinding("key.drawWeapons", KeyConflictContext.IN_GAME, Keyboard.KEY_R, "key.categories.gameplay");
    ClientRegistry.registerKeyBinding(drawWeapons);
    mc = FMLClientHandler.instance().getClient();
}
项目:HoloInventory    文件:ClientEventHandler.java   
public static void init()
{
    if (instance != null) MinecraftForge.EVENT_BUS.unregister(instance);
    instance = new ClientEventHandler();
    MinecraftForge.EVENT_BUS.register(new ClientEventHandler());

    keyHold = new KeyBinding("Hold to show", KeyConflictContext.IN_GAME, Keyboard.KEY_H, HoloInventory.MODID);
    keyToggle = new KeyBinding("Toggle to show", KeyConflictContext.IN_GAME, 0, HoloInventory.MODID);
    ClientRegistry.registerKeyBinding(keyHold);
    ClientRegistry.registerKeyBinding(keyToggle);
}
项目:CreeperHostGui    文件:Client.java   
@Override
public void registerKeys()
{
    openGuiKey = new KeyBinding("minetogether.key.friends", KeyConflictContext.UNIVERSAL, KeyModifier.CONTROL, Keyboard.KEY_M, "minetogether.keys");
    ClientRegistry.registerKeyBinding(openGuiKey);
}
项目:MeeCreeps    文件:KeyBindings.java   
public static void init() {
    repeatLastMessage = new KeyBinding("key.last_message", KeyConflictContext.IN_GAME, Keyboard.KEY_R, "key.categories.meecreeps");
    ClientRegistry.registerKeyBinding(repeatLastMessage);
}
项目:PurificatiMagicae    文件:KeyBindings.java   
public static void setup()
{
    USE_SIP_AMULET = new KeyBinding("key.use_sip_amulet", KeyConflictContext.IN_GAME, Keyboard.KEY_U, "key.categories.purmag");
    ClientRegistry.registerKeyBinding(USE_SIP_AMULET);
}
项目:Alchemy    文件:AlchemyKeyBinding.java   
public AlchemyKeyBinding(String description, int keyCode) {
    super(description, keyCode, AlchemyConstants.MOD_ID);
    setKeyConflictContext(KeyConflictContext.IN_GAME);
    register();
}
项目:Hard-Science    文件:ModKeys.java   
public static void init(FMLInitializationEvent event)
{
    PLACEMENT_CYCLE_SELECTION_TARGET = new KeyBinding("key.placement_cycle_selection_target", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.CONTROL, Keyboard.KEY_R, "key.categories.hard_science");
    PLACEMENT_CYCLE_REGION_ORIENTATION = new KeyBinding("key.placement_cycle_region_orientation", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.ALT, Keyboard.KEY_R, "key.categories.hard_science");
    PLACEMENT_CYCLE_BLOCK_ORIENTATION = new KeyBinding("key.placement_cycle_block_orientation", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_R, "key.categories.hard_science");
    PLACEMENT_HISTORY_FORWARD = new KeyBinding("key.placement_history_forward", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.SHIFT, Keyboard.KEY_B, "key.categories.hard_science");
    PLACEMENT_HISTORY_BACK = new KeyBinding("key.placement_history_back", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.CONTROL, Keyboard.KEY_B, "key.categories.hard_science");
    PLACEMENT_DISPLAY_GUI = new KeyBinding("key.placement_display_gui", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_B, "key.categories.hard_science");
    PLACEMENT_CYCLE_FILTER_MODE = new KeyBinding("key.placement_cycle_filter_mode", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.CONTROL, Keyboard.KEY_F, "key.categories.hard_science");
    PLACEMENT_CYCLE_SPECIES_HANDLING = new KeyBinding("key.placement_cycle_species_handling", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.CONTROL, Keyboard.KEY_V, "key.categories.hard_science");
    PLACEMENT_CYCLE_TARGET_MODE = new KeyBinding("key.placement_cycle_target_mode", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_V, "key.categories.hard_science");
    PLACEMENT_PREVIEW = new KeyBinding("key.placement_preview", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_P, "key.categories.hard_science");
    PLACEMENT_INCREASE_WIDTH = new KeyBinding("key.placement_increase_width", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_RIGHT, "key.categories.hard_science");
    PLACEMENT_DECREASE_WIDTH = new KeyBinding("key.placement_decrease_width", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_LEFT, "key.categories.hard_science");
    PLACEMENT_INCREASE_HEIGHT = new KeyBinding("key.placement_increase_height", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.SHIFT, Keyboard.KEY_UP, "key.categories.hard_science");
    PLACEMENT_DECREASE_HEIGHT = new KeyBinding("key.placement_decrease_height", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.SHIFT, Keyboard.KEY_DOWN, "key.categories.hard_science");
    PLACEMENT_INCREASE_DEPTH = new KeyBinding("key.placement_increase_depth", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_UP, "key.categories.hard_science");
    PLACEMENT_DECREASE_DEPTH = new KeyBinding("key.placement_decrease_depth", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.NONE, Keyboard.KEY_DOWN, "key.categories.hard_science");
    PLACEMENT_UNDO = new KeyBinding("key.placement_undo", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM, 
            KeyModifier.CONTROL, Keyboard.KEY_Z, "key.categories.hard_science");
    PLACEMENT_LAUNCH_BUILD = new KeyBinding("key.placement_launch_build", KeyConflictContext.IN_GAME, 
            KeyModifier.CONTROL, Keyboard.KEY_L, "key.categories.hard_science");

    ClientRegistry.registerKeyBinding(PLACEMENT_HISTORY_FORWARD);
    ClientRegistry.registerKeyBinding(PLACEMENT_HISTORY_BACK);
    ClientRegistry.registerKeyBinding(PLACEMENT_PREVIEW);
    ClientRegistry.registerKeyBinding(PLACEMENT_DISPLAY_GUI);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_FILTER_MODE);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_SPECIES_HANDLING);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_TARGET_MODE);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_BLOCK_ORIENTATION);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_REGION_ORIENTATION);
    ClientRegistry.registerKeyBinding(PLACEMENT_UNDO);
    ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_WIDTH);
    ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_WIDTH);
    ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_HEIGHT);
    ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_HEIGHT);
    ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_DEPTH);
    ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_DEPTH);
    ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_SELECTION_TARGET);
    ClientRegistry.registerKeyBinding(PLACEMENT_LAUNCH_BUILD);
}