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


Java FMLInitializationEvent類代碼示例

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


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

示例1: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent evt) {
	INSTANCE.registerMessage(LobbyPlayerOpenedGuiPacketHandler.class, LobbyPlayerOpenedGuiPacket.class, 0,
			Side.SERVER);

	INSTANCE.registerMessage(LobbyBeginGamePacketHandler.class, LobbyBeginGamePacket.class, 1, Side.SERVER);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesClientHandler.class, PacketSyncPlayerPropertiesClient.class,
			2, Side.CLIENT);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesServerHandler.class, PacketSyncPlayerPropertiesServer.class,
			3, Side.SERVER);

	INSTANCE.registerMessage(PacketSyncTileEntityServerHandler.class, PacketSyncTileEntityServer.class, 4,
			Side.SERVER);
	INSTANCE.registerMessage(PacketSyncTileEntityClientHandler.class, PacketSyncTileEntityClient.class, 5,
			Side.CLIENT);

	NetworkRegistry.INSTANCE.registerGuiHandler(PAYDAY.instance, new MGuiHandler());
	GameRegistry.registerBlock(lobbyBlock, "Lobby");
	GameRegistry.registerTileEntity(LobbyTileEntity.class, "lobby_tile_entity");

	FMLCommonHandler.instance().bus().register(eventHandler);
	MinecraftForge.EVENT_BUS.register(eventHandler);
}
 
開發者ID:TominoCZ,項目名稱:PAYDAY,代碼行數:24,代碼來源:PAYDAY.java

示例2: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

	ModRecipes.init();

	proxy.registerEvents();
	proxy.registerEntities();
	proxy.registerRenderers();

	if (ModEntityList.hasEntitiesWithEggs()) {
		ModEntityList.entity_egg = new ItemEntityEgg();
		GameRegistry.registerItem(ModEntityList.entity_egg, "entity_egg");
		OreDictionary.registerOre("mobEgg", ModEntityList.entity_egg);
	}

	isTinkersConstructLoaded = Loader.isModLoaded("TConstruct");
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:19,代碼來源:EtFuturum.java

示例3: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的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

示例4: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
public void init(final FMLInitializationEvent event) {
    NetworkRegistry.INSTANCE.registerGuiHandler((Object)ExtraUtilsMod.instance, (IGuiHandler)new GuiHandler());
    if (Loader.isModLoaded("ForgeMultipart")) {
        this.FMPRegisterPassThroughInterfaces();
    }
    ExtraUtilsMod.proxy.registerEventHandler();
    ExtraUtilsMod.proxy.registerRenderInformation();
    if (Loader.isModLoaded("ThermalExpansion")) {
        TE4IMC.addIntegration();
    }
    if (Loader.isModLoaded("MineFactoryReloaded")) {
        MFRIntegration.registerMFRIntegration();
    }
    for (final ILoading loader : this.loaders) {
        loader.init();
    }
    EE3Integration.finalRegister();
}
 
開發者ID:sameer,項目名稱:ExtraUtilities,代碼行數:19,代碼來源:ExtraUtils.java

示例5: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
  public void init(FMLInitializationEvent event)
  {
MinecraftForge.EVENT_BUS.register(new NoteblockPlaceHandler());
cpw.mods.fml.common.FMLCommonHandler.instance().bus().register(new CreditNotifer());
INSTANCE.registerMessage(BlockMessageHandler.class, BlockMessage.class, 0, Side.SERVER);
INSTANCE.registerMessage(BlockEnhancedMessageHandler.class, BlockEnhancedMessage.class, 1, Side.SERVER);
Mapping.init();
RealPianoMapping.init();
itemNbT = new ItemNoteblockFork();
itemNbT.setUnlocalizedName("noteblockfork");
itemNbT.setTextureName("noteblocktweak:noteblock_fork_hand");
itemNbT.setMaxStackSize(1);
itemNbT.setCreativeTab(CreativeTabs.tabTools);
GameRegistry.registerItem(itemNbT, "NoteblockFork");
BLOCKN = new BlockEnhancedNote();
GameRegistry.registerBlock(BLOCKN, "EnhancedNoteBlock");
GameRegistry.registerTileEntity(TileEntityEnhancedNote.class, "tileenhancednote");
  }
 
開發者ID:cqjjjzr,項目名稱:NoteblockTweak,代碼行數:20,代碼來源:NoteblockTweak.java

示例6: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的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

示例7: initialize

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void initialize(FMLInitializationEvent event)
{
	TerraFirmaCraft.PACKET_PIPELINE.registerPacket(InitClientWorldPacket.class);
	FMLCommonHandler.instance().bus().register(new PlayerTracker());
	MinecraftForge.EVENT_BUS.register(new ChunkEventHandler());
	MinecraftForge.EVENT_BUS.register(new PlayerInteractionHandler());
	MinecraftForge.EVENT_BUS.register(new AnvilCraftingHandler());
	
	if (Loader.isModLoaded("MineTweaker3"))
	{
		MineTweakerAPI.registerClass(ItemHeat.class);
		MineTweakerAPI.registerClass(Loom.class);
		MineTweakerAPI.registerClass(Quern.class);
		MineTweakerAPI.registerClass(Barrel.class);
		MineTweakerAPI.registerClass(Anvil.class);
		MineTweakerAPI.registerClass(Knapping.class);
	}
}
 
開發者ID:StrayWolfe,項目名稱:TFC-Tweaker,代碼行數:20,代碼來源:TFCTweaker.java

示例8: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent event)
{
    super.init(event);
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockCapacitor), new ItemRendererCapacitor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockDiode), new ItemRendererDiode());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockResistor), new ItemRendererResistor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockSwitch), new ItemRendererSwitch());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockInvisTess), new ItemRendererInvisTess());
    //MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockRFMeter), new ItemRendererRFMeter());
    MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialTess, new ItemRendererMaterialTess());
    //MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialDisplay, new ItemRendererMaterialDisplay());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockTransistor), new ItemRendererTransistor());
    FMLCommonHandler.instance().bus().register(new KeyInputHandler());
    KeyBindings.init();
}
 
開發者ID:XFactHD,項目名稱:RFUtilities,代碼行數:17,代碼來源:ClientProxy.java

示例9: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的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

示例10: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent e) {
	super.init(e);
	Register.registerGlobalEntityID(EntityLaser.class, "laser");

	Register.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());

	Register.registerItemRenderer(RorysMod.items.rifle1, new RenderRifle());
	Register.registerItemRenderer(RorysMod.items.rifle2, new RenderRifle());
	Register.registerItemRenderer(RorysMod.items.rifle3, new RenderRifle());
	Register.registerItemRenderer(RorysMod.items.rifle4, new RenderRifle());
	Register.registerItemRenderer(RorysMod.items.rifle5, new RenderRifle());

	TileEntitySpecialRenderer render = new RenderRifleTable();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRifleTable.class, render);
	Register.registerItemRenderer(Item.getItemFromBlock(RorysMod.blocks.upgradeTable), new ItemRender(render, new TileEntityRifleTable()));

	render = new RenderPoweredChest();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPoweredChest.class, render);

	FMLInterModComms.sendMessage("Waila", "register", WailaConfig.class.getName() + ".callbackRegister");
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:23,代碼來源:ClientProxy.java

示例11: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent event) {
	Register.addShapedRecipie(new ItemStack(steelBlock), new Object[] { "sss", "sss", "sss", 's', "ingotSteel" });
	for (int id = 0; id < ((BlockBaseMeta) testingWall).getMetaSize(); id++) {
		ItemStack dye = new ItemStack(Items.dye, 1, 15 - id);
		ItemStack currentBlock = new ItemStack(testingWall, 1, id);
		Register.addShapedRecipie(currentBlock, new Object[] { " i ", "idi", " i ", 'i', "ingotSteel", 'd', dye });
		Register.addShapelessRecipie(currentBlock, new Object[] { "testingWall", dye, dye, dye });
	}
	Register.addShapedRecipie(new ItemStack(upgradeTable), new Object[] { "sss", "ici", "iti", 's', "plateSteel", 'i', "ingotIron", 'c', "cpu", 't', Blocks.crafting_table });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 0), new Object[] { " l ", "lbl", " l ", 'b', "testingWall", 'l', new ItemStack(Items.dye, 1, 4) });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 1), new Object[] { " d ", " b ", "   ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 2), new Object[] { "  d", " b ", "   ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 3), new Object[] { "   ", " bd", "   ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 4), new Object[] { "   ", " b ", "  d", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) });
	Register.addShapedRecipie(new ItemStack(bluePrint, 1, 0), new Object[] { "d  ", " b ", "   ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) });

	Register.addShapelessRecipie(new ItemStack(poweredChest), new Object[] { Blocks.chest, Items.redstone, Blocks.tripwire_hook });

	Register.addShapedRecipie(new ItemStack(renamer), new Object[] { " n ", "gmg", "csc", 'n', Items.name_tag, 'g', "blockGlass", 'm', IC2Items.getItem("machine"), 'c', IC2Items.getItem("coil"), 's', "plateSteel" });
	Register.addShapedRecipie(new ItemStack(solderBlock), new Object[] { "sss", "sss", "sss", 's', "ingotSolder" });
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:23,代碼來源:ModBlocks.java

示例12: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	RMLog.info("Registering Recipes");
	blocks.init(event);
	items.init(event);
	achievements.init(event);

	RMLog.info("Registering everything else");

	Register.registerGUI(new GuiHandler());

	registerEventHandlers();
	registerTileEntities();
	registerModEntities();

	proxy.init(event);
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:18,代碼來源:RorysMod.java

示例13: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	FairyEventListener listener = new FairyEventListener();
	MinecraftForge.EVENT_BUS.register(listener);

	proxy.initEntities();
	LOGGER.debug("Registered entities");

	proxy.initChannel(listener);
	LOGGER.debug("Registered channel");

	/*
	FMLCommonHandler.instance().bus().register(this);
	LOGGER.debug("Registered events");
	*/

	proxy.initGUI();
	LOGGER.debug("Registered GUI");

	LOGGER.info("Loaded version %s", Version.VERSION);
}
 
開發者ID:allaryin,項目名稱:FairyFactions,代碼行數:22,代碼來源:FairyFactions.java

示例14: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的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

示例15: init

import cpw.mods.fml.common.event.FMLInitializationEvent; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	proxy.load();
	this.registerEntities();
	// TODO Register Planets: -------------------------------

	TrappistOnePlanets.init();

	TPCreativeTabs.TPBlocksTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPBlocks", Item.getItemFromBlock(Blocks.grass), 0);
	TPCreativeTabs.TPItemsTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPItems", TPItems.itemAlienGel, 0);
	TPCreativeTabs.TPArmorTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPArmor", Items.diamond_helmet, 0);

}
 
開發者ID:BlesseNtumble,項目名稱:TRAPPIST-1,代碼行數:14,代碼來源:Core.java


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