本文整理汇总了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);
}
示例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");
}
示例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);
}
示例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();
}
示例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");
}
示例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);
}
示例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);
}
}
示例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();
}
示例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();
}
示例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");
}
示例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" });
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}