Java Code Examples for cpw.mods.fml.common.Mod

The following are top voted examples for showing how to use cpw.mods.fml.common.Mod. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: StructPro   File: Structpro.java   View source code 7 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    Configurator.configure(new File("config/" + MODID + ".cfg"));
    GameRegistry.registerWorldGenerator(new Decorator(), 4096);
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(this);
}
 
Example 2
Project: Hammer-Mod   File: HammerMod.java   View source code 7 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.init(event);
	
	
	ItemLoader.LoadItems();
	//BlockLoader.loadBlocks();
	Recipes.registerRecpies();
	//EntityLoader.LoadEntitys();
	//OreDict.addores();
	Achievements.loadAchievements();
	Stats.RegisterStats();

	PlayerChecker.checkPlayer(username);
	LootRegistry.registerLoot();
	
}
 
Example 3
Project: PopularMMOS-EpicProportions-Mod   File: epicproportionsmod_halloween.java   View source code 7 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.init(event);
	// register CommonProxy as our GuiHandler
	NetworkRegistry.INSTANCE.registerGuiHandler(MODID, new CommonProxy());
	
	ItemLoader.LoadItems();
	BlockLoader.loadBlocks();
	Recipes.registerRecpies();
	EntityLoader.LoadEntitys();
	OreDict.addores();
	//Achievements.loadAchievements();
	//Stats.RegisterStats();

	GameRegistry.registerWorldGenerator(new ModWorldGen(), 0);
	
}
 
Example 4
Project: PopularMMOS-EpicProportions-Mod   File: epicproportionsmod_christmas.java   View source code 7 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.init(event);
	
	
	ItemLoader.LoadItems();
	BlockLoader.loadBlocks();
	Recipes.registerRecpies();
	EntityLoader.LoadEntitys();
	OreDict.addores();
	Achievements.loadAchievements();
	Stats.RegisterStats();
	
	
	EntityRegistry.registerModEntity(EntityGiantSnowBall.class, "GiantSnowBall", EntityRegistry.findGlobalUniqueEntityId(), MODID, 80, 3, true);

	proxy.registerRenderThings();
	
	GameRegistry.registerTileEntity(TileEntityBulb.class, "Bulb");
	TileEntity.addMapping(TileEntityBulb.class, "Bulb_Mapping");
	BulbModelID = 72;
	
	}
 
Example 5
Project: Technical   File: Technical.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
	proxy.registerNetworkStuff();
	NetworkRegistry.INSTANCE.registerGuiHandler(this, new TechnicalGuiHandler());
	TechnicalItem.removeVanillaRecipes();
	Recipes.init();
	FMLCommonHandler.instance().bus().register(new EventListener());
	radioactivityPotion = (new PotionTechnical(radioactivityPotionId, true, 0)).setIconIndex(0, 0).setPotionName("potion.radioactivityPotion");
	TechnicalAchievement.init();
	AchievementPage.registerAchievementPage(technicalAchievementPage);
}
 
Example 6
Project: LotrAddonsRings   File: ProxyCommon.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void onInit(FMLInitializationEvent e){
    /*
    REGISTERS ALL COMMON THINGS SO FOR BOTH SERVER AND CLIENT...
     */
    LOTRAddonsItems.registerRings();
    LOTRAddonsBlocks.registerBlocks();
    LOTRAddonsEntities.registerEntities();
    NetworkRegistry.INSTANCE.registerGuiHandler(LOTRAddons.lotrAddons, new GuiHandler());


}
 
Example 7
Project: BIGB   File: BIGB.java   View source code 6 votes vote down vote up
/**
 * This is the second pass of logic in this mod.
 */
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	InitEvent e;
	e = new InitEvent();
	e.Go(event);
}
 
Example 8
Project: PopularMMOS-EpicProportions-Mod   File: EpicProportionsMod.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
	{
		//Thread.currentThread().setName("EpicProportionsMod");
		
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerChocolate));
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerForJen));
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerLove));
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerPinkHeart));
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerRainbow));
		MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerRedHeart));
		MinecraftForge.EVENT_BUS.register(new CustomPresentDrops());
		MinecraftForge.EVENT_BUS.register(new VersionChecker());
		MinecraftForge.EVENT_BUS.register(new CommandModInfo());
		//MinecraftForge.EVENT_BUS.register(new PotionLoader(33, false, 8171462));
		//MinecraftForge.EVENT_BUS.register(new PotionLoader(33, false, 8171462));
		MinecraftForge.EVENT_BUS.register(new WorldGenPumpkin_Pat());
		MinecraftForge.EVENT_BUS.register(new WorldGenPumpkin_Jen());
		MinecraftForge.EVENT_BUS.register(new StructureVillagePieces());
		//MinecraftForge.EVENT_BUS.register(new Yggdrasil());
		MinecraftForge.EVENT_BUS.register(new LogHelper());
		//MinecraftForge.EVENT_BUS.register(new CommandModInfo());
        //MinecraftForge.EVENT_BUS.register(new BiomeGenPat(getBIOME_ID_PAT()));
        //MinecraftForge.EVENT_BUS.register(new BiomeGenJen(getBIOME_ID_JEN()));
        //MinecraftForge.EVENT_BUS.register(new WorldProviderEpicProportions());
        //MinecraftForge.EVENT_BUS.register(new EpicProportionsBiomes(ENTITY_ID_0, null));
		//MinecraftForge.EVENT_BUS.register(new RenderGuiHandler());
		//MinecraftForge.ORE_GEN_BUS.register(new BiomeDecorator());
        
	    Recipes.registerRecpies();

	    MinecraftForge.EVENT_BUS.register(new CommandChangelog());
	    
	    //MUhTTawz.maAzeRcL();
	}
	
	
}
 
Example 9
Project: WorldBorder-Forge   File: WorldBorder.java   View source code 6 votes vote down vote up
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverStart(FMLServerStartingEvent event)
{
    if (INSTANCE == null) INSTANCE = this;
    if (SERVER   == null) SERVER   = event.getServer();
    if (COMMAND  == null) COMMAND  = new WBCommand();

    // Load (or create new) config files
    Config.load(false);

    // our one real command, though it does also have aliases "wb" and "worldborder"
    event.registerServerCommand(COMMAND);

    if ( Config.preventBlockPlace() )
        enableBlockPlaceListener(true);

    if ( Config.preventMobSpawn() )
        enableMobSpawnListener(true);

    if ( Config.getDenyEnderpearl() )
        enableEnderPearlListener(true);

    DynMapFeatures.registerListener();
}
 
Example 10
Project: PrimitiveCraft   File: PrimitiveCraft.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	//Load Mod Items
	ModItems.init();
	//Load Mod Blocks
	ModBlocks.init();
	//Load Mod Recipes
	ModRecipes.init();
	//Register Renders on client side
	proxy.initRenders();
	//Register GuiHandler
	NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
	//Register Mod Compat
	CompatHandler.init(event);
	//Register Leave drops
	MinecraftForge.EVENT_BUS.register(EventDrops.instancemain);
	//Register Mod World Gen
	ModWorldGen.init();
}
 
Example 11
Project: StabilizerMod   File: Stabilizermod.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    registrant = new Registrant(32);
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
}
 
Example 12
Project: TFC-Tweaks   File: TFCTweaks.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    log = event.getModLog();

    FMLCommonHandler.instance().bus().register(EventHandlers.I);
    MinecraftForge.EVENT_BUS.register(EventHandlers.I);

    cfg = new Configuration(event.getSuggestedConfigurationFile());
    doConfig(cfg);

    if (TFCTweaksLoadingPlugin.DISABLE_ASM)
    {
        log.warn("********************************************************************************************");
        log.warn("          You have disabled ASM tweaks. All FluidHacks have been disabled.");
        log.warn("Please don't include this in your pack config. This is to be considered a DEBUG option only!");
        log.warn("********************************************************************************************");
    }
    else
    {
        FluidHacks.doTheMagic();
    }
}
 
Example 13
Project: TFC-Tweaks   File: TFCTweaks.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    try
    {
        FileUtils.writeStringToFile(new File(DimensionManager.getCurrentSaveRootDirectory(), "seed.txt"), String.valueOf(DimensionManager.getWorld(0).getSeed()));
        WorldExplorer.jsonFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "WorldExplorer.json");
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
    if (autoPregen_enabled && !WorldExplorer.jsonFile.exists())
    {
        ChunkCoordinates spawn = MinecraftServer.getServer().worldServers[0].getSpawnPoint();
        WorldExplorer.start(MinecraftServer.getServer(), spawn.posX >> 4, spawn.posZ >> 4, autoPregen_size / 16);
    }
}
 
Example 14
Project: ae2ee3emcaddon   File: ae2ee3emcaddon.java   View source code 6 votes vote down vote up
@Mod.EventHandler
void postInit(FMLPostInitializationEvent event) {
    if (Loader.isModLoaded("EE3")) {
        Stopwatch watch = Stopwatch.createStarted();
        AELog.info("Post Initialization ( started )");

        RegisterCrafting.initRecipes();
        RegisterFurnace.initRecipes();
        RegisterFacade.initRecipes();
        RegisterGrinder.initRecipes();
        RegisterInscriber.initRecipes();
        RegisterWorld.initRecipes();

        //RecipeRegistryProxy.dumpRecipeRegistryToLog();

        AELog.info("Post Initialization ( ended after " + watch.elapsed(TimeUnit.MILLISECONDS) + "ms )");
    }
}
 
Example 15
Project: DMTweaks   File: Main.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    Tab.init();
    Base.init();

    Config.init(event.getSuggestedConfigurationFile());
    FMLCommonHandler.instance().bus().register(new Config());
    ItemStackHolderInjector.INSTANCE.inject();
    if (Loader.isModLoaded("Botania"))
    {
        Botania.preInit();
    }

    if (Loader.isModLoaded("ThermalExpansion"))
    {
        TE_Intergration.preInit();
    }

    LogHelper.info("Pre Initialization Complete");
}
 
Example 16
Project: DMTweaks   File: Main.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void init (FMLInitializationEvent event)
{
    ItemStackHolderInjector.INSTANCE.inject();
    Blocks.init();
    OreDicHelper.init();
    SlabHelper.init();
    CraftingHelper.init();
    if (Loader.isModLoaded("Botania"))
    {
        Botania.init();
    }

    if (Loader.isModLoaded("ThermalExpansion"))
    {
        TE_Intergration.init();
    }

    LogHelper.info("Initialization Complete");
}
 
Example 17
Project: DMTweaks   File: Main.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void postInit (FMLPostInitializationEvent event)
{
    ItemStackHolderInjector.INSTANCE.inject();
    if (Loader.isModLoaded("Botania"))
    {
        Botania.postInit();
    }

    if (Loader.isModLoaded("ThermalExpansion"))
    {
        TE_Intergration.postInit();
    }

    LogHelper.info("Post Initialization Complete");
}
 
Example 18
Project: ThermalCasting   File: ThermalCasting.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public static void init(FMLInitializationEvent event)
{
	GameRegistry.addRecipe(new ShapedOreRecipe(blockCastingFrame, new Object[] {"xxx", "x x", "xxx", 'x', "rodStone"}));
	
	LiquidCasting casting = TConstruct.getBasinCasting();
	//Get fluids
	for (FluidType type :  FluidType.fluidTypes.values())
	{
		FluidStack fluid = new FluidStack(type.fluid, TConstruct.blockLiquidValue);
		//Recipes
		CastingRecipe rec = casting.getCastingRecipe(fluid, null);
		
		if (rec != null)
			ThermalExpansionHelper.addTransposerFill(energyCost, new ItemStack(blockCastingFrame), rec.getResult(), fluid, false);
	}
}
 
Example 19
Project: AetherCraft2   File: EquivLib.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	//sys = new NumericSystem(); //for testing
	
	configRoot = new File(event.getModConfigurationDirectory(), "eqlib/");
	configRoot.mkdir();
	
	mainConfigDir = new File(configRoot,"eqlib.cfg");
	
	mainConfig = new Configuration(mainConfigDir);
	mainConfig.load();
	RecipeRegistry.oreDictBlacklist = mainConfig.getStringList("oreDictBlacklist", "general", new String[0], "A blacklist of ore dictionary entries NOT to equate.");
	mainConfig.save();
	
	modsConfigDir = new File(configRoot, "mods/");
	modsConfigDir.mkdir();
}
 
Example 20
Project: HardcoreWither   File: HardcoreWither.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
   logger.info(TextHelper.localize("info." + ModInformation.ID + ".console.load.preInit"));
   
   ConfigManager.getInstance().init(event.getModConfigurationDirectory());

   powerUpManager.init();
   ItemRegistry.registerItems();
   BlockRegistry.registerBlocks();
   PotionRegistry.registerPotions();
   EntityRegistry.register();
   
   FMLCommonHandler.instance().bus().register(eventHandler);
   NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
}
 
Example 21
Project: RecycleCraft   File: RecycleCraft.java   View source code 6 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {

	// config
	ConfigHandler.init(event.getSuggestedConfigurationFile());
	
	// proxy
	proxy.init();
	proxy.registerRenderers();
	proxy.registerEvents();

       // data
       BlockData.init();
       ItemData.init();
       TileData.init();
       MultiblockData.init();

       // recipes
    Recipes.registerRecipes();
}
 
Example 22
Project: LetsEncryptRoot   File: LetsEncryptRoot.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    if (event.getSide() == Side.SERVER) {
        logger.info("Client side only mod - not doing anything on the server!");
        return;
    }
}
 
Example 23
Project: CreeperHostGui   File: CreeperHostServer.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event)
{
    event.registerServerCommand(new CommandInvite());
    event.registerServerCommand(new CommandPregen());
    deserializePreload(new File(getSaveFolder(), "pregenData.json"));
}
 
Example 24
Project: CreeperHostGui   File: CreeperHostServer.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void serverStopping(FMLServerStoppingEvent event)
{
    if (!CreeperHost.instance.active)
        return;
    serverOn = false;
    serializePreload();
    pregenTasks.clear();
}
 
Example 25
Project: CreeperHostGui   File: CreeperHostServer.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
    if (!CreeperHost.instance.active)
        return;
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
    logger = e.getModLog();
}
 
Example 26
Project: Technical   File: Technical.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	TechnicalBlock.registerBlocks();
	TechnicalItem.registerItems();
	TechnicalTools.registerTools();
	GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);

	proxy.registerTileEntities();
	
	((Item) Item.itemRegistry.getObject("water_bucket")).setMaxStackSize(16);
	
	for (int i = 0; i < 5; ++i) {
		VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());
	}

	Potion[] potionTypes;
	for (Field f : Potion.class.getDeclaredFields()) {
		f.setAccessible(true);
		try {
			if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) {
				Field modfield = Field.class.getDeclaredField("modifiers");
				modfield.setAccessible(true);
				modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL);
				potionTypes = (Potion[]) f.get(null);
				final Potion[] newPotionTypes = new Potion[256];
				System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length);
				f.set(null, newPotionTypes);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	MinecraftForge.EVENT_BUS.register(new TechnicalEventHooks());
	MinecraftForge.ORE_GEN_BUS.register(new TechnicalOreGenEventHooks());
}
 
Example 27
Project: FTB-Islands   File: FTBIslands.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void serverLoading(FMLServerStartingEvent event) {
    logger.info("Registering commands.");
    event.registerServerCommand(new CreateIslandsCommand());
    event.registerServerCommand(new DeleteIslandCommand());
    event.registerServerCommand(new JoinIslandCommand());
    event.registerServerCommand(new ListIslandsCommand());
    event.registerServerCommand(new RenameIslandCommand());
    event.registerServerCommand(new SaveIslandsCommand());
    event.registerServerCommand(new SetIslandSpawnCommand());
    logger.info("Finished registering commands.");
    loadIslands();
    loadChestLoot();
}
 
Example 28
Project: FTB-Islands   File: FTBIslands.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) throws IOException {
    BufferedReader br = new BufferedReader(new FileReader(islands.getPath()));
    if (br.readLine() == null) {
        logger.info("Islands file empty, placing a default value.");
        IslandCreator.islandLocations.put("default", new IslandCreator.IslandPos(0, 60, 0));
        try {
            saveIslands(IslandCreator.islandLocations);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    br.close();
}
 
Example 29
Project: taser-mod   File: TaserMain.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	TaserItemsAndBlocks.initItems();
	TaserItemsAndBlocks.initBlocks();
	TaserRecipes.registerRecipes();
	

	//Logs
	log.info("Pre Init!");
	log.info(TaserReference.modid + " IS STARTING UP...........................");
}
 
Example 30
Project: FCMiner   File: FCMiner.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    GameRegistry.registerBlock(new GenericOre("Iron"), "GenericOre");
    GameRegistry.registerTileEntity(OreTile.class, "GenericTile");

    GameRegistry.registerBlock(new Miner(), "Miner");
    GameRegistry.registerTileEntity(MinerTile.class, "MinerTile");

  DescriptionHandler.init();
  NetworkHandler.init();
}
 
Example 31
Project: BIGB   File: BIGB.java   View source code 5 votes vote down vote up
/**
 * This is the first pass of logic in this mod.
 */
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	PreInitEvent e;
	e = new PreInitEvent();
	e.Go(event);

}
 
Example 32
Project: BIGB   File: BIGB.java   View source code 5 votes vote down vote up
/**
 * This is the third pass of logic in this mod.
 */
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
	PostInitEvent e;
	e = new PostInitEvent();
	e.Go(event);
}
 
Example 33
Project: RFUtilities   File: RFUtilities.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    LogHelper.info("Hello Minecraft!");
    TE_LOADED = Loader.isModLoaded("ThermalExpansion");
    OC_LOADED = Loader.isModLoaded("OpenComputers");
    RFU_NET_WRAPPER = NetworkRegistry.INSTANCE.newSimpleChannel("rfu");
    proxy.preInit(event);
    LogHelper.info("PreInit complete");
}
 
Example 34
Project: RFUtilities   File: RFUtilities.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    LogHelper.info("Hello Minecraft!");
    TE_LOADED = Loader.isModLoaded("ThermalExpansion");
    OC_LOADED = Loader.isModLoaded("OpenComputers");
    CC_LOADED = Loader.isModLoaded("ComputerCraft");
    RFU_NET_WRAPPER = NetworkRegistry.INSTANCE.newSimpleChannel("rfu");
    proxy.preInit(event);
    LogHelper.info("PreInit complete");
}
 
Example 35
Project: Lotr_Mod_Addons   File: LOTRRings.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    NetworkRegistry.INSTANCE.registerGuiHandler(this, new UIHandler());

    LOTRRItems.register();
    LOTRRBlocks.register();
    LOTRRTileEntities.register();
   proxy.init(event);
}
 
Example 36
Project: New-Menu   File: Menu.java   View source code 5 votes vote down vote up
@Mod.EventHandler
@SideOnly(Side.CLIENT)
public void preInit(FMLPreInitializationEvent e)
{
	Configuration config = new Configuration(e.getSuggestedConfigurationFile());
	config.load();
	//读取配置文件
	ConfigVar.onlinecheck = config.get("Online", "Check", false).getBoolean();
	ConfigVar.version = config.get("Online", "Version", "v1.0").getString();
	ConfigVar.url = config.get("Online", "url", "http://127.0.0.1/").getString();
	ConfigVar.IsTwoAddress = config.get("Server", "1sTwoAddress", false).getBoolean();
	ConfigVar.ServerAddress = config.get("Server", "Address1", "127.0.0.1").getString();
	ConfigVar.ServerAddress1 = config.get("Server", "Address2", "127.0.0.1").getString();
	ConfigVar.Captain = config.get("Server", "Captain", "Minecraft 1.7.10").getString();
	ConfigVar.announcement = config.get("Server", "Announcement", "").getString();
	ConfigVar.announcementmove = config.get("Server", "AnnouncementMove", false).getBoolean();
	ConfigVar.debug = config.get("General", "debugMode", false).getBoolean();
	ConfigVar.ChangeLogFilename = config.get("Online", "ChangelogFilename", "NewMenuChangelog.txt").getString();
	ConfigVar.JsonFilename = config.get("Online", "JsonFilename", "NewMenu.json").getString();
	config.save();
	//结束读取
	if(ConfigVar.onlinecheck)
	{
		this.changeLog = InternetUtil.LoadText(ConfigVar.url + "/" + ConfigVar.ChangeLogFilename);
		this.jsonString = InternetUtil.LoadText(ConfigVar.url + "/" + ConfigVar.JsonFilename);
	}

	Display.setTitle(ConfigVar.Captain);
	MinecraftForge.EVENT_BUS.register(NewMenuHandler.instance);
}
 
Example 37
Project: BetterChat   File: BetterChat.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void serverStart(FMLServerStartingEvent e)
{
    MinecraftServer server = getServer();
    ICommandManager iCommandManager = server.getCommandManager();
    ServerCommandManager serverCommandManager = (ServerCommandManager)iCommandManager;

    serverCommandManager.registerCommand(new CommandHandler());
}
 
Example 38
Project: WorldBorder-Forge   File: WorldBorder.java   View source code 5 votes vote down vote up
/**
 * Given WorldBorder's dependency on dedicated server classes and is designed for
 * use in multiplayer environments, we don't load anything on the client
 */
@Mod.EventHandler
@SideOnly(Side.CLIENT)
public void clientPreInit(FMLPreInitializationEvent event)
{
    Log.error("This mod is intended only for use on servers");
    Log.error("Please consider removing this mod from your installation");
}
 
Example 39
Project: WorldBorder-Forge   File: WorldBorder.java   View source code 5 votes vote down vote up
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverStop(FMLServerStoppingEvent event)
{
    DynMapFeatures.removeAllBorders();
    Config.storeFillTask();
}
 
Example 40
Project: AntiMatterMod   File: AntiMatterModCore.java   View source code 5 votes vote down vote up
@Mod.EventHandler
@SuppressWarnings("unused")
public void preinit(FMLPreInitializationEvent event) {
    loadMeta(modMetadata);
    DeveloperBossTexture.downloadTexture();//開発者のスキンのダウンロード
    AntiMatterModRegistry.registerPreInit(event);
    AMMRegistry.INSTANCE.handlePreInit();
    OreDictionaryRegister.OreDictionaryRegisterPreInit(event);
    proxy.registerClientInfo();
}