Example #1
0
  /**
   * Called a bit later on during initialization to finish loading mods Also initializes key
   * bindings
   */
  @SuppressWarnings("deprecation")
  public void finishMinecraftLoading() {
    if (modsMissing != null
        || wrongMC != null
        || customError != null
        || dupesFound != null
        || modSorting != null) {
      return;
    }
    try {
      Loader.instance().initializeMods();
    } catch (CustomModLoadingErrorDisplayException custom) {
      FMLLog.log(
          Level.SEVERE, custom, "A custom exception was thrown by a mod, the game will now halt");
      customError = custom;
      return;
    } catch (LoaderException le) {
      haltGame(
          "There was a severe problem during mod loading that has caused the game to fail", le);
      return;
    }
    LanguageRegistry.reloadLanguageTable();
    RenderingRegistry.instance()
        .loadEntityRenderers(
            (Map<Class<? extends Entity>, Render>) RenderManager.field_78727_a.field_78729_o);

    loading = false;
    KeyBindingRegistry.instance().uploadKeyBindingsToGame(client.field_71474_y);
  }
Example #2
0
 public KeyboardClient() {
   KeyBindingRegistry.registerKeyBinding(
       new KeyHandler(
           this,
           new KeyBinding[] {
             this.altKey, this.boostKey, this.modeSwitchKey, this.sideinventoryKey
           }));
 }
  @Init
  public void init(FMLInitializationEvent event) {
    KeyBindingRegistry.registerKeyBinding(new CCKeyHandler(statsKey));

    LanguageRegistry.instance().addStringLocalization("itemGroup.tabCC", Reference.TABNAME);

    // testItem
    testItem = new ItemBase(testItemId).setUnlocalizedName("testItem");
    LanguageRegistry.addName(testItem, Reference.TEST_ITEM);
  }
  public void preInit(FMLPreInitializationEvent event) {
    RenderPlayerAPI.register("kes5219_improvedfirstperson", IFPRenderPlayerBase.class);
    ModelPlayerAPI.register("kes5219_improvedfirstperson", IFPModelPlayerBase.class);

    KeyBindingRegistry.registerKeyBinding(new IFPKeyHandler());

    try {
      if (AnimatedPlayer.instance != null) {
        System.out.println("Animated Player mod detected by Improved First Person.");
        animatedPlayerInstalled = true;
      }
    } catch (LinkageError e) {

    }

    MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
  }