@EventHandler
  public void preinit(FMLPreInitializationEvent event) {
    LogHelper.info("Let's Move!");
    FLNetwork.init();

    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    TilePusher.maxTiles =
        config.get(Configuration.CATEGORY_GENERAL, "maximumBlocksPushed", 1024).getInt(1024);
    TilePusher.powerPerTile =
        config.get(Configuration.CATEGORY_GENERAL, "energyPerBlock", 250).getInt(250);
    Recipes.shouldAddRecipes =
        config.get(Configuration.CATEGORY_GENERAL, "addRecipes", true).getBoolean(true);
    Recipes.shouldAddFrameCopyResetRecipes =
        config
            .get(Configuration.CATEGORY_GENERAL, "addFrameCopyResetRecipes", true)
            .getBoolean(true);
    redrawChunksInstantly = config.get("client", "redrawChunksInstantly", true).getBoolean(true);
    if (config.hasChanged()) config.save();

    EntityMovingEventHandler.init();
    MoverEventHandler.init();

    for (int i = 0; i < 4; i++) {
      BlockStickyFrame.curLoadingIndex = i;
      GameRegistry.register(frame[i] = new BlockStickyFrame());
      GameRegistry.register(
          new ItemBlockFrame(frame[i]).setRegistryName(frame[i].getRegistryName()));
    }
    GameRegistry.register(moving = new BlockMoving());
    pusher = new BlockPusher();
    pusher.setUnlocalizedName("funkylocomotion:pusher");
    pusher.setRegistryName("funkylocomotion:pusher");
    GameRegistry.register(pusher);
    GameRegistry.register(new ItemBlockPusher(pusher).setRegistryName(pusher.getRegistryName()));

    GameRegistry.register(slider = new BlockSlider());
    GameRegistry.register(new ItemBlock(slider).setRegistryName(slider.getRegistryName()));
    GameRegistry.register(teleporter = new BlockTeleport());
    GameRegistry.register(
        new ItemBlockTeleporter(teleporter).setRegistryName(teleporter.getRegistryName()));
    GameRegistry.register(booster = new BlockBooster());
    GameRegistry.register(new ItemBlock(booster).setRegistryName(booster.getRegistryName()));
    GameRegistry.register(frameProjector = new BlockFrameProjector());
    GameRegistry.register(
        new ItemBlock(frameProjector).setRegistryName(frameProjector.getRegistryName()));

    GameRegistry.register(wrench = WrenchFactory.makeMeAWrench());

    GameRegistry.registerTileEntity(TileMovingServer.class, "funkylocomotion:tileMover");
    GameRegistry.registerTileEntity(TilePusher.class, "funkylocomotion:tilePusher");
    GameRegistry.registerTileEntity(TileSlider.class, "funkylocomotion:tileSlider");
    GameRegistry.registerTileEntity(TileBooster.class, "funkylocomotion:tileBooster");
    GameRegistry.registerTileEntity(TileTeleport.class, "funkylocomotion:tileTeleporter");
    GameRegistry.registerTileEntity(TileFrameProjector.class, "funkylocomotion:tileFrameProjector");

    proxy.registerRendering();

    CompatHandler.initCompat(event.getAsmData());
  }
Example #2
0
  @EventHandler
  public void onPreInit(FMLPreInitializationEvent event) {
    LOGGER = event.getModLog();

    EnginationBlocks.init();
    EnginationItems.init();
  }
  @EventHandler
  public void preInit(FMLPreInitializationEvent event) {
    importResources(Minecraft.getMinecraft().getResourceManager());

    config = new Configuration(event.getSuggestedConfigurationFile());
    syncConfig();
  }
Example #4
0
 public FluidLoader(FMLPreInitializationEvent event) {
   if (FluidRegistry.isFluidRegistered(fluidMercury)) {
     event
         .getModLog()
         .info("Found fluid {}, the registration is canceled. ", fluidMercury.getName());
     fluidMercury = FluidRegistry.getFluid(fluidMercury.getName());
   } else {
     FluidRegistry.registerFluid(fluidMercury);
   }
 }
  @EventHandler
  public void preInit(FMLPreInitializationEvent event) {
    log("Starting to load....");
    log("Loading config file....");
    log(
        mod_SecurityCraft.VERSION
            + " of SecurityCraft is for a post MC-1.6.4 version! Configuration files are useless for setting anything besides options.");
    mod_SecurityCraft.configFile = new Configuration(event.getSuggestedConfigurationFile());
    this.configHandler.setupConfiguration();
    log("Config file loaded.");
    log("Setting up handlers!");
    this.configHandler.setupHandlers(event);
    log("Handlers registered.");
    log("Setting up network....");
    mod_SecurityCraft.network = NetworkRegistry.INSTANCE.newSimpleChannel(mod_SecurityCraft.MODID);
    this.configHandler.setupPackets(mod_SecurityCraft.network);
    log("Network setup.");

    log("Loading mod additions....");
    this.configHandler.setupAdditions();

    if (this.debuggingMode) {
      this.configHandler.setupDebugAdditions();
    }

    log("Finished loading mod additions.");
    log("Doing registering stuff... (PT 1/2)");
    this.configHandler.setupGameRegistry();

    serverProxy.registerTextureFiles();

    ModMetadata modMeta = event.getModMetadata();
    modMeta.authorList = Arrays.asList(new String[] {"Geforce, bl4ckscor3"});
    modMeta.autogenerated = false;
    modMeta.credits = "Thanks to all of you guys for your support!";
    modMeta.description =
        "Adds a load of things to keep your house safe with.\nIf you like this mod, hit the green arrow\nin the corner of the forum thread!\nPlease visit the URL above for help. \n \nMessage of the update: \n"
            + MOTU;
    modMeta.url = "breakinbad.net";
  }
Example #6
0
  @Mod.EventHandler
  public void onPreInit(FMLPreInitializationEvent event) {
    config =
        (Config) ConfigHandler.registerConfig(new Config(event.getSuggestedConfigurationFile()));

    proxy.preInit();

    channel =
        ChannelHandler.getChannelHandlers(
            MOD_NAME, PacketBark.class, PacketSpawnParticles.class, PacketKeyState.class);

    ModVersionChecker.register_iChunMod(
        new ModVersionInfo(MOD_NAME, iChunUtil.versionOfMC, VERSION, false));
  }
  @Mod.EventHandler
  public void preInit(FMLPreInitializationEvent event) {
    Config.load(event);

    HarvestLevels.init();

    NetworkRegistry.INSTANCE.registerGuiHandler(instance, guiHandler);

    if (event.getSide().isClient()) {
      ClientProxy.initClient();
    }

    TinkerNetwork.instance.setup();
    CapabilityTinkerProjectile.register();
  }
Example #8
0
  public void preInit(FMLPreInitializationEvent event) {
    PsiAPI.internalHandler = new InternalMethodHandler();

    ConfigHandler.init(event.getSuggestedConfigurationFile());

    ModItems.init();
    ModBlocks.init();
    ModEntities.init();
    ModSpellPieces.init();
    ModCraftingRecipes.init();

    NetworkHandler.init();
    NetworkRegistry.INSTANCE.registerGuiHandler(Psi.instance, new GuiHandler());

    MinecraftForge.EVENT_BUS.register(new PlayerDataHandler.EventHandler());
  }
Example #9
0
  public static void preInit(FMLPreInitializationEvent event) {
    config = new Configuration(event.getSuggestedConfigurationFile());

    config.load();

    Property basicInfoHudMainColorPro =
        config.get(Configuration.CATEGORY_GENERAL, "InfoHudMainColor", 13);
    basicInfoHudMainColorPro.comment = "Main color of the Info HUD.";
    basicInfoHudMainColor = basicInfoHudMainColorPro.getInt(13);

    Property basicInfoHudItemColorPro =
        config.get(Configuration.CATEGORY_GENERAL, "InfoHudItemColor", 6);
    basicInfoHudItemColorPro.comment = "Item color of the Info HUD.";
    basicInfoHudItemColor = basicInfoHudItemColorPro.getInt(6);

    config.save();
  }
Example #10
0
  @Mod.EventHandler
  public void preInit(FMLPreInitializationEvent event) {
    final Stopwatch stopwatch = Stopwatch.createStarted();
    logHelper.info("Pre Initialization (Started)");

    proxy.registerConfiguration(event.getSuggestedConfigurationFile());

    proxy.registerBlocks();
    proxy.registerItems();

    proxy.registerGUIs();

    proxy.registerFurnaceRecipes();
    proxy.registerEvents();

    proxy.registerRenderers();

    IntegrationsManager.instance().index();
    IntegrationsManager.instance().preInit();

    logHelper.info(
        "Pre Initialization (Ended after " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + "ms)");
  }
 public static void initConfig(FMLPreInitializationEvent event) {
   file = new Configuration(event.getSuggestedConfigurationFile());
   syncConfig();
 }