当前位置: 首页>>代码示例>>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;未经允许,请勿转载。