当前位置: 首页>>代码示例>>Java>>正文


Java FMLInitializationEvent类代码示例

本文整理汇总了Java中net.minecraftforge.fml.common.event.FMLInitializationEvent的典型用法代码示例。如果您正苦于以下问题:Java FMLInitializationEvent类的具体用法?Java FMLInitializationEvent怎么用?Java FMLInitializationEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FMLInitializationEvent类属于net.minecraftforge.fml.common.event包,在下文中一共展示了FMLInitializationEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent e) {
    proxy.init(e);

    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Cat", SoundEvents.RECORD_CAT,         183000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Blocks", SoundEvents.RECORD_BLOCKS,   327000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Chirp", SoundEvents.RECORD_CHIRP,     183000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Far", SoundEvents.RECORD_FAR,         152400000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mall", SoundEvents.RECORD_MALL,       190200000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mellohi", SoundEvents.RECORD_MELLOHI, 81600000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Stal", SoundEvents.RECORD_STAL,       138000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Strad", SoundEvents.RECORD_STRAD,     184800000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Wait", SoundEvents.RECORD_WAIT,       214800000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Ward", SoundEvents.RECORD_WARD,       246600000));
    //ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 11",    SoundEvents.RECORD_11,        66600000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 13", SoundEvents.RECORD_13,           154800000));
}
 
开发者ID:lukas2005,项目名称:Device-Mod-Apps,代码行数:18,代码来源:Main.java

示例2: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    CapabilityExtendedHealthSystem.register();

    int i = 0;
    NETWORKING = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
    NETWORKING.registerMessage(MessageReceiveDamage.Handler.class, MessageReceiveDamage.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyHealingItem.Handler.class, MessageApplyHealingItem.class, ++i , Side.SERVER);
    NETWORKING.registerMessage(MessageReceiveConfiguration.Handler.class, MessageReceiveConfiguration.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyAbsorption.Handler.class, MessageApplyAbsorption.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageAddHealth.Handler.class, MessageAddHealth.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessagePlayHurtSound.Handler.class, MessagePlayHurtSound.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageClientUpdate.Handler.class, MessageClientUpdate.class, ++i, Side.SERVER);
    NETWORKING.registerMessage(MessageResync.Handler.class, MessageResync.class, ++i, Side.CLIENT);
    MessageReceiveConfiguration.validate();

    if (Loader.isModLoaded("morpheus")) {
        enableMorpheusCompat = true;
        logger.info("Morpheus present - enabling compatibility module");
        MorpheusHelper.register();
    }

    RegistryManager.registerDefaults();
    checkEarlyExit();
}
 
开发者ID:ichttt,项目名称:FirstAid,代码行数:26,代码来源:FirstAid.java

示例3: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{		
	FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addVersionCheck", VERSION_LINK);
	
	instance = this;		
	proxy.init();
       
       EventHandler eventHandler = new EventHandler();
       MinecraftForge.EVENT_BUS.register(eventHandler);
	
       if(FMLCommonHandler.instance().getEffectiveSide().isClient())
           FMLCommonHandler.instance().bus().register(eventHandler);
       
       //Minecraft.getMinecraft().gameSettings.showInventoryAchievementHint = false;
       Minecraft.getMinecraft().gameSettings.saveOptions();
       
       //Stop space from activating buttons, allowing it to be used for adding keyframes in the timeline.
       InputMap im = (InputMap)UIManager.get("Button.focusInputMap");
       im.put(KeyStroke.getKeyStroke("pressed SPACE"), "none");
       im.put(KeyStroke.getKeyStroke("released SPACE"), "none");
}
 
开发者ID:ObsidianSuite,项目名称:ObsidianSuite,代码行数:23,代码来源:ObsidianAnimator.java

示例4: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
	proxy.init(event);

	NetworkRegistry.INSTANCE.registerGuiHandler(Currency.INSTANCE, new GuiHandler());

	AccountCapability.register();
	CartCapability.register();

	PacketDispatcher.registerPackets();

	FMLInterModComms.sendMessage("waila", "register", "com.zundrel.currency.common.compat.waila.CurrencyWailaProvider.callbackRegister");

	GameRegistry.registerTileEntity(TileEntityShopController.class, ModInfo.MODID + ":" + "shop_controller");
	GameRegistry.registerTileEntity(TileEntityDisplay.class, ModInfo.MODID + ":" + "display");
	GameRegistry.registerTileEntity(TileEntityStockCrate.class, ModInfo.MODID + ":" + "stock_crate");
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:18,代码来源:Currency.java

示例5: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
    LOG.info("Initializing ProjectEon");
    LOG.debug("Registering base...");
    PROXY.registerBase();
    LOG.debug("Registering blocks...");
    PROXY.registerBlocks();
    LOG.debug("Registering items...");
    PROXY.registerItems();
    LOG.debug("Registering tile entities...");
    PROXY.registerTileEntities();
    LOG.debug("Registering entities...");
    PROXY.registerEntities();
    LOG.debug("Registering packets...");
    PROXY.registerPackets();
    LOG.debug("Registering handlers...");
    PROXY.registerHandlers();
    LOG.info("Done.");
}
 
开发者ID:Guichaguri,项目名称:ProjectEon,代码行数:20,代码来源:ProjectEon.java

示例6: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
public void init(FMLInitializationEvent e){
	//tile entity
	GameRegistry.registerTileEntity(TileActivePile.class, Constants.MODID+"active_pile");
	GameRegistry.registerTileEntity(TileCreosoteCollector.class, Constants.MODID+"creosote_collector");
	GameRegistry.registerTileEntity(TilePotteryKiln.class, Constants.MODID+"pottery_kiln");
	
	GameRegistry.registerFuelHandler(new FuelRegistry());
	MinecraftForge.EVENT_BUS.register(new PileIgnitr());
	MinecraftForge.EVENT_BUS.register(new PotionRegistry());
	
	PotionRegistry.initPotions();
	ItemsRegistry.initOreDict();
	
	if(!Config.DisableDefaultPottery)
		PotteryKilnRecipe.initRecipes();
	PotteryKilnRecipe.initCustomRecipes(Config.PotteryRecipes);
	if(Config.RegisterRecipes)
		Crafting.registerRecipes();
}
 
开发者ID:EnderiumSmith,项目名称:CharcoalPit,代码行数:20,代码来源:CommonProxy.java

示例7: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
public void init(FMLInitializationEvent event)
{
       // Register for various events:
       FMLCommonHandler.instance().bus().register(this);
       MinecraftForge.EVENT_BUS.register(this);

       GameSettings settings = Minecraft.getMinecraft().gameSettings;
       setUpExtraKeys(settings);

       this.stateMachine = new ClientStateMachine(ClientState.WAITING_FOR_MOD_READY, this);
       
       this.originalMouseHelper = Minecraft.getMinecraft().mouseHelper;
       this.mouseHook = new MouseHook();
       this.mouseHook.isOverriding = true;
       Minecraft.getMinecraft().mouseHelper = this.mouseHook;
       setInputType(InputType.AI);
   }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:18,代码来源:MalmoModClient.java

示例8: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Override
public void init(FMLInitializationEvent event)
{
	bindingP = new KeyBinding("Player Information", Keyboard.KEY_P, "Lost Eclipse");
	
	ClientRegistry.registerKeyBinding(bindingP);
}
 
开发者ID:TheXFactor117,项目名称:Loot-Slash-Conquer,代码行数:8,代码来源:ClientProxy.java

示例9: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event)
{
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
	GameRegistry.registerWorldGenerator(new LSCWorldGenerator(), 100);
	proxy.init(event);
}
 
开发者ID:TheXFactor117,项目名称:Loot-Slash-Conquer,代码行数:8,代码来源:LootSlashConquer.java

示例10: loadIncludedConfig

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Override
public void loadIncludedConfig(FMLInitializationEvent e, List<String> includedJsons)
{
	for (String json : includedJsons)
	{
		JsonSmelterRecipeHandler handler = BBJsonLoader.deserializeObject(json, JsonSmelterRecipeHandler.class);

		if (handler == null)
		{
			LogUtil.log(Level.ERROR, "Could not deserialize included json.");
			continue;
		}

		boolean missingDependencies = false;
		for (String mod : handler.getModDependencies())
		{
			if (!Loader.isModLoaded(mod))
			{
				LogUtil.log(Level.WARN, "Mod '" + mod + "' missing, skipping all recipes in file.");
				missingDependencies = true;
				break;
			}
		}

		if (missingDependencies)
		{
			continue;
		}

		includes.add(handler);

		for (JsonSmelterRecipe r : handler.getRecipes())
		{
			r.register();
		}
	}
}
 
开发者ID:einsteinsci,项目名称:BetterBeginningsReborn,代码行数:38,代码来源:SmelterConfig.java

示例11: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    MessageParser.remake();
    ClientCommandHandler.instance.registerCommand(new TextCommand());
    MinecraftForge.EVENT_BUS.register(events = new TextEvents());

    Minecraft.getMinecraft().addScheduledTask(() -> {
        websiteUtils.begin();
        loader.begin();
    });
}
 
开发者ID:boomboompower,项目名称:TextDisplayer,代码行数:12,代码来源:TextDisplayerMod.java

示例12: loadIncludedConfig

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Override
public void loadIncludedConfig(FMLInitializationEvent e, List<String> includedJsons)
{
	for (String json : includedJsons)
	{
		JsonBoosterHandler handler = BBJsonLoader.deserializeObject(json, JsonBoosterHandler.class);

		if (handler == null)
		{
			LogUtil.log(Level.ERROR, "Could not deserialize included json.");
			continue;
		}

		boolean missingDependencies = false;
		for (String mod : handler.getModDependencies())
		{
			if (!Loader.isModLoaded(mod))
			{
				LogUtil.log(Level.WARN, "Mod '" + mod + "' missing, skipping all recipes in file.");
				missingDependencies = true;
				break;
			}
		}

		if (missingDependencies)
		{
			continue;
		}

		includes.add(handler);

		for (JsonBooster r : handler.getBoosters())
		{
			r.register();
		}
	}
}
 
开发者ID:einsteinsci,项目名称:BetterBeginningsReborn,代码行数:38,代码来源:BoosterConfig.java

示例13: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
   // register recipe
   BlockXPBox.registerRecipe();

   // register xp capability
   CapabilityManager.INSTANCE.register(XPCapability.class,
         new XPCapability.Storage(),
         XPCapability::new);

   // register event handler
   MinecraftForge.EVENT_BUS.register(this);
}
 
开发者ID:arucil,项目名称:mc-XPBox,代码行数:14,代码来源:XPBox.java

示例14: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
    Map<Object, ModContainer> forgeListenerOwners = getForgeListenerOwners();

    // Remove HammerCore ads.
    forgeListenerOwners.entrySet().stream()
            .filter(objectModContainerEntry -> objectModContainerEntry.getKey().toString().contains("hammercore.client.RenderGui"))
            .forEach(objectModContainerEntry -> {
                // Remove the normal RenderGUI from the forge event bus, then generate a proxy.
                MinecraftForge.EVENT_BUS.unregister(objectModContainerEntry.getKey());
                MinecraftForge.EVENT_BUS.register(HammerKiller.createProxy(objectModContainerEntry.getKey()));
            });
}
 
开发者ID:darkevilmac,项目名称:CreeperKiller,代码行数:14,代码来源:CreeperKiller.java

示例15: init

import net.minecraftforge.fml.common.event.FMLInitializationEvent; //导入依赖的package包/类
@Override
public void init(FMLInitializationEvent evt)
{
    ExPBlocks.logs = new Block[]{ ExPBlocks.log0, ExPBlocks.log1, ExPBlocks.log2, ExPBlocks.log3, ExPBlocks.log4, ExPBlocks.log5, ExPBlocks.log6, ExPBlocks.log7, ExPBlocks.log8 };
    ExPBlocks.logsDeco = new Block[]{ ExPBlocks.logDeco0, ExPBlocks.logDeco1, ExPBlocks.logDeco2, ExPBlocks.logDeco3, ExPBlocks.logDeco4, ExPBlocks.logDeco5, ExPBlocks.logDeco6, ExPBlocks.logDeco7, ExPBlocks.logDeco8 };
    ExPBlocks.leaves = new Block[]{ ExPBlocks.leaf0, ExPBlocks.leaf1, ExPBlocks.leaf2, ExPBlocks.leaf3, ExPBlocks.leaf4, ExPBlocks.leaf5, ExPBlocks.leaf6, ExPBlocks.leaf7, ExPBlocks.leaf8 };
    ExPBlocks.shrubs = new Block[]{ ExPBlocks.shrubNormal, ExPBlocks.shrubBlooming, ExPBlocks.shrubAutumn, ExPBlocks.shrubDead };
    ExPBlocks.berryBushes = new Block[]{ ExPBlocks.berryBushNormal, ExPBlocks.berryBushBerries, ExPBlocks.berryBushAutumn, ExPBlocks.berryBushDead };
}
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:10,代码来源:ExPBlocksRegistry.java


注:本文中的net.minecraftforge.fml.common.event.FMLInitializationEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。