コード例 #1
0
  @EventHandler
  public void init(FMLInitializationEvent event) {
    log("Setting up inter-mod stuff...");

    FMLInterModComms.sendMessage(
        "Waila",
        "register",
        "net.breakinbad.securitycraft.imc.waila.WailaDataProvider.callbackRegister");

    NBTTagCompound vcUpdateTag = VersionUpdateChecker.getNBTTagCompound();
    if (vcUpdateTag != null) {
      FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addUpdate", vcUpdateTag);
    }

    this.serverProxy.setupTextureRegistry();

    log("Doing registering stuff... (PT 2/2)");

    NetworkRegistry.INSTANCE.registerGuiHandler(this, GuiHandler);

    this.configHandler.setupEntityRegistry();
    serverProxy.registerRenderThings();
  }
コード例 #2
0
  public static void register() {

    if (Loader.isModLoaded("VersionChecker")) {
      final NBTTagCompound nbt = new NBTTagCompound();
      nbt.setString("curseProjectName", CURSE_PROJECT_NAME);
      nbt.setString("curseFilenameParser", MOD_NAME_TEMPLATE);
      FMLInterModComms.sendRuntimeMessage(Module.MOD_ID, "VersionChecker", "addVersionCheck", nbt);
    }

    if (ModOptions.getOnlineVersionChecking()) {
      final VersionCheck test = new VersionCheck();
      MinecraftForge.EVENT_BUS.register(test);
      new Thread(test).start();
    }
  }