當前位置: 首頁>>代碼示例>>Java>>正文


Java Mod類代碼示例

本文整理匯總了Java中cpw.mods.fml.common.Mod的典型用法代碼示例。如果您正苦於以下問題:Java Mod類的具體用法?Java Mod怎麽用?Java Mod使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Mod類屬於cpw.mods.fml.common包,在下文中一共展示了Mod類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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);
}
 
開發者ID:ternsip,項目名稱:StructPro,代碼行數:8,代碼來源:Structpro.java

示例2: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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();
	
}
 
開發者ID:jtrent238,項目名稱:Hammer-Mod,代碼行數:19,代碼來源:HammerMod.java

示例3: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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);
	
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:19,代碼來源:epicproportionsmod_halloween.java

示例4: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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;
	
	}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:25,代碼來源:epicproportionsmod_christmas.java

示例5: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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);
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:12,代碼來源:Technical.java

示例6: onInit

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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());


}
 
開發者ID:TimVerhaegen,項目名稱:LotrAddonsRings,代碼行數:13,代碼來源:ProxyCommon.java

示例7: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:SneakyTactician,項目名稱:BIGB,代碼行數:11,代碼來源:BIGB.java

示例8: postInit

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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();
	}
	
	
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:39,代碼來源:EpicProportionsMod.java

示例9: serverStart

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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();
}
 
開發者ID:RoyCurtis,項目名稱:WorldBorder-Forge,代碼行數:26,代碼來源:WorldBorder.java

示例10: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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();
}
 
開發者ID:gigabit101,項目名稱:PrimitiveCraft,代碼行數:21,代碼來源:PrimitiveCraft.java

示例11: init

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    registrant = new Registrant(32);
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
}
 
開發者ID:ternsip,項目名稱:StabilizerMod,代碼行數:8,代碼來源:Stabilizermod.java

示例12: preInit

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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();
    }
}
 
開發者ID:dries007,項目名稱:TFC-Tweaks,代碼行數:24,代碼來源:TFCTweaks.java

示例13: serverStarted

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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);
    }
}
 
開發者ID:dries007,項目名稱:TFC-Tweaks,代碼行數:19,代碼來源:TFCTweaks.java

示例14: postInit

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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 )");
    }
}
 
開發者ID:FireBall1725,項目名稱:ae2ee3emcaddon,代碼行數:19,代碼來源:ae2ee3emcaddon.java

示例15: preInit

import cpw.mods.fml.common.Mod; //導入依賴的package包/類
@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");
}
 
開發者ID:dmaster8,項目名稱:DMTweaks,代碼行數:22,代碼來源:Main.java


注:本文中的cpw.mods.fml.common.Mod類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。