コード例 #1
0
  @EventHandler
  public void init(FMLInitializationEvent event) {
    // Add this module to the core list
    Mekanism.modulesLoaded.add(this);

    packetHandler.initialize();

    // Set up the GUI handler
    NetworkRegistry.INSTANCE.registerGuiHandler(this, new GeneratorsGuiHandler());
    FMLCommonHandler.instance().bus().register(this);

    // Load the proxy
    proxy.loadConfiguration();
    proxy.registerRegularTileEntities();
    proxy.registerSpecialTileEntities();
    proxy.registerRenderInformation();

    addRecipes();

    // Finalization
    Mekanism.logger.info("Loaded MekanismGenerators module.");
  }
コード例 #2
0
 @SubscribeEvent
 public void onConfigChanged(OnConfigChangedEvent event) {
   if (event.modID.equals("MekanismGenerators")) {
     proxy.loadConfiguration();
   }
 }