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


Java Init类代码示例

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


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

示例1: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event) {
	OilGenerator oilGenerator = OilGenerator.getInstance();
	LanguageRegistry.addName(oilGenerator, "Oil Generator");
	GameRegistry.registerBlock(oilGenerator, "oilGenerator");
	GameRegistry.registerTileEntity(OilGeneratorTileEntity.class,
			"oilGenerator");

	OilStill oilStill = OilStill.getInstance();
	LanguageRegistry.addName(oilStill, "Oil Still");
	GameRegistry.registerBlock(oilStill, "oilStill");

	OilFlow oilFlow = OilFlow.getInstance();
	LanguageRegistry.addName(oilFlow, "Oil Flow");
	GameRegistry.registerBlock(oilFlow, "oilFlow");

	// liquid world gen stuff
	ReplaceWithLiquidWorldGen liquidWorldGen = new ReplaceWithLiquidWorldGen();
	ToGenerateLiquid oilGen = new ToGenerateLiquid(55, 60, 1, 5, 16, 5,
			OilStill.getInstance().blockID);
	liquidWorldGen.add(oilGen, "oil");
}
 
开发者ID:lirelent,项目名称:Oilcraft,代码行数:23,代码来源:Oilcraft.java

示例2: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
   public void load(FMLInitializationEvent event) {

gameRegistry();
languageRegistry();
setHarvestLevels();
tileEntities();
networkRegisters();

// proxy.registerRenderers();

GameRegistry.registerWorldGenerator(new WorldGeneratorHeroez());

RecipesTabletDecoder.decoding().addSmelting(Block.gravel.blockID,
	new ItemStack(Block.cobblestone, 1, 0), 0.7F);

   }
 
开发者ID:JRizzle,项目名称:HeroezMod,代码行数:18,代码来源:Heroez.java

示例3: init

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void init(FMLInitializationEvent event) {

	log(Level.INFO, "Initializing " + Reference.MOD_ID + " version: " + meta.version);

	proxy.registerTileEntities();

	proxy.initRenderingAndTextures();

	/*
	 * if (!useUeVoltageSensitivity) {
	 * UniversalElectricity.isVoltageSensitive = true;
	 * //EELogger.finest("Successfully toggled Voltage Sensitivity!");
	 * }
	 */

	UniversalElectricity.isNetworkActive = true;

	DimensionManager.registerProviderType(DimensionIds.TERRA, WorldProviderTerra.class, false);
	DimensionManager.registerDimension(DimensionIds.TERRA, DimensionIds.TERRA);
}
 
开发者ID:VitezKolya,项目名称:AltEnergy,代码行数:22,代码来源:AltEnergy.java

示例4: init

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void init(FMLInitializationEvent evt) {
    hexbiscus = new BlockHexbiscus(HexxitGearConfig.hexbiscus.getInt());

    tribalHelmet = new ItemTribalArmor(HexxitGearConfig.tribalHelmetId.getInt(), proxy.addArmor("tribal"), 0).setUnlocalizedName("hexxitgear.tribal.helmet");
    tribalChest = new ItemTribalArmor(HexxitGearConfig.tribalChestId.getInt(), proxy.addArmor("tribal"), 1).setUnlocalizedName("hexxitgear.tribal.chest");
    tribalLeggings = new ItemTribalArmor(HexxitGearConfig.tribalLeggingsId.getInt(), proxy.addArmor("tribal"), 2).setUnlocalizedName("hexxitgear.tribal.leggings");
    tribalShoes = new ItemTribalArmor(HexxitGearConfig.tribalShoesId.getInt(), proxy.addArmor("tribal"), 3).setUnlocalizedName("hexxitgear.tribal.boots");
    scaleHelmet = new ItemScaleArmor(HexxitGearConfig.scaleHelmetId.getInt(), proxy.addArmor("scale"), 0).setUnlocalizedName("hexxitgear.scale.helmet");
    scaleChest = new ItemScaleArmor(HexxitGearConfig.scaleChestId.getInt(), proxy.addArmor("scale"), 1).setUnlocalizedName("hexxitgear.scale.chest");
    scaleLeggings = new ItemScaleArmor(HexxitGearConfig.scaleLeggingsId.getInt(), proxy.addArmor("scale"), 2).setUnlocalizedName("hexxitgear.scale.leggings");
    scaleBoots = new ItemScaleArmor(HexxitGearConfig.scaleBootsId.getInt(), proxy.addArmor("scale"), 3).setUnlocalizedName("hexxitgear.scale.boots");
    thiefHelmet = new ItemThiefArmor(HexxitGearConfig.thiefHelmetId.getInt(), proxy.addArmor("thief"), 0).setUnlocalizedName("hexxitgear.thief.helmet");
    thiefChest = new ItemThiefArmor(HexxitGearConfig.thiefChestId.getInt(), proxy.addArmor("thief"), 1).setUnlocalizedName("hexxitgear.thief.chest");
    thiefLeggings = new ItemThiefArmor(HexxitGearConfig.thiefLeggingsId.getInt(), proxy.addArmor("thief"), 2).setUnlocalizedName("hexxitgear.thief.leggings");
    thiefBoots = new ItemThiefArmor(HexxitGearConfig.thiefBootsId.getInt(), proxy.addArmor("thief"), 3).setUnlocalizedName("hexxitgear.thief.boots");

    hexicalEssence = new ItemHexicalEssence(HexxitGearConfig.hexicalEssence.getInt());
    hexicalDiamond = new ItemHexicalDiamond(HexxitGearConfig.hexicalDiamond.getInt());

    GameRegistry.registerBlock(hexbiscus, hexbiscus.getUnlocalizedName());

    GameRegistry.registerWorldGenerator(new HGWorldGen());

    proxy.init();
}
 
开发者ID:sct,项目名称:HexxitGear,代码行数:27,代码来源:HexxitGear.java

示例5: Init

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void Init(FMLInitializationEvent e)
{
	converterBlockRedPower = new BlockPowerConverterRedPower(blockIdRedPower);
	GameRegistry.registerBlock(converterBlockRedPower, ItemBlockPowerConverterRedPower.class, "blockPowerConverterRedPower");
	GameRegistry.registerTileEntity(TileEntityRedPowerConsumer.class, "powerConverterRP2Consumer");
	GameRegistry.registerTileEntity(TileEntityRedPowerProducer.class, "powerConverterRP2Producer");
	LanguageRegistry.addName(new ItemStack(converterBlockRedPower, 1, 0), "RP2 Consumer");
	LanguageRegistry.addName(new ItemStack(converterBlockRedPower, 1, 1), "RP2 Producer");

	GameRegistry.addRecipe(new ItemStack(converterBlockRedPower, 1, 0),
			"G G", "ROR", "G G",
			Character.valueOf('G'), Item.ingotGold,
			Character.valueOf('R'), Item.redstone,
			Character.valueOf('O'), Block.obsidian);

	GameRegistry.addShapelessRecipe(new ItemStack(converterBlockRedPower, 1, 1), new ItemStack(converterBlockRedPower, 1, 0));
	GameRegistry.addShapelessRecipe(new ItemStack(converterBlockRedPower, 1, 0), new ItemStack(converterBlockRedPower, 1, 1));



	proxy.load();
}
 
开发者ID:OvertJaguar,项目名称:PowerConverters-RPModule,代码行数:24,代码来源:RPModule.java

示例6: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event) {
	//load the keyboard bindings
	kbh = ShoulderKeybindings.registerKeybindings();
	
	//create mc pointer
	mc = ModLoader.getMinecraftInstance();
	
	//create tick handler
	st = new ShoulderTickHandler();
	TickRegistry.registerTickHandler(st, Side.CLIENT);
}
 
开发者ID:sabarjp,项目名称:ShoulderSurfing,代码行数:13,代码来源:ShoulderSurfing.java

示例7: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init       // used in 1.5.2
public void load(FMLInitializationEvent event) {
	//proxy.registerKeyBindings();
	TickRegistry.registerTickHandler(tickHandler, Side.CLIENT);
	NetworkRegistry.instance().registerConnectionHandler(new WDLConnectionHandler());
	System.err.println("WDL loaded");
	instance = this;
}
 
开发者ID:xurei,项目名称:forge_world_downloader,代码行数:9,代码来源:Modloader.java

示例8: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event) {
	// GameRegistry.registerPlayerTracker(new PlayerTracker());
	TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
	// MinecraftForge.EVENT_BUS.register(new EventHandler());
	logger.info("Loaded.");
}
 
开发者ID:oddstr13,项目名称:UrbanCraft-CommandForwarder,代码行数:8,代码来源:CommandForwarder.java

示例9: initMod

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void initMod(FMLInitializationEvent e){
	items = new ItemHandler(config);
	blocks = new BlockHandler(config);
	crafting = new CraftingHandler();
	GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileWorkstation.class, "MineTech:Workstation");
	GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileIdeaBuilder.class, "MineTech:IdeaBuilder");
	GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileCraftingTable.class, "MineTech:CraftingTable");
	GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileDualFurnace.class, "MineTech:DualFurnace");
	GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileSuperContainer.class, "MineTech:SuperContainer");
	proxy.addNames();
	proxy.registerHandlers();
}
 
开发者ID:aronthor,项目名称:MineTech,代码行数:14,代码来源:MineTechPlus.java

示例10: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event) {
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);

    proxy.registerTileEntities();
    proxy.initRenderingAndTextures();
}
 
开发者ID:jarthur36,项目名称:MMOMats,代码行数:8,代码来源:MMOMats.java

示例11: initBooks

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void initBooks(FMLInitializationEvent event) { // Main init method
    proxy.registerRenderInformation();
    proxy.registerEntities();
    proxy.registerItems();
    proxy.registerTileEntities(); // Myah
    proxy.registerBlocks(); //Calls the registerBlocks method
    proxy.addNames(); // Whatever
    proxy.addRecipes(); // Etc
    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); // Registers the class that deals with GUI data
}
 
开发者ID:arilotter,项目名称:EnhancedBooks,代码行数:12,代码来源:BooksCore.java

示例12: init

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void init(FMLInitializationEvent evt) {
	makeshiftBattery = new BlockMakeshiftBattery(SPSConfig.makeshiftBatteryId.getInt());
	if (Loader.isModLoaded("ThermalExpansion")) {
		makeshiftConductance = new ItemMakeshiftConductanceCoil(SPSConfig.conductanceCoilId.getInt());
	}
	makeshiftUpgrade = new ItemMakeshiftUpgrade(SPSConfig.makeshiftUpgradeId.getInt());
	
	GameRegistry.registerBlock(makeshiftBattery, makeshiftBattery.getUnlocalizedName());
	
	GameRegistry.registerTileEntity(TileEntityMakeshiftBattery.class, "entityMSBattery");
	
	NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
}
 
开发者ID:sct,项目名称:SimplePowerStorage,代码行数:15,代码来源:SimplePowerStorage.java

示例13: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Init
public void load(FMLInitializationEvent event) {

    // Register the GUI Handler
    // NetworkRegistry.instance().registerGuiHandler(instance, proxy);

    // Initialize mod tile entities
    proxy.registerTileEntities();

    // Initialize custom rendering and pre-load textures (Client only)
    proxy.initRenderingAndTextures();

    CraftingManager.getInstance().getRecipeList().add(new RecipesArcPad());
}
 
开发者ID:PaleoCrafter,项目名称:NetCraft,代码行数:16,代码来源:NetCraft.java

示例14: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event){

    proxy.registerRenderers();
    items = new ItemHandler(config);
    blocks = new BlockHandler(config);
    crafting = new CraftingHandler();
    proxy.addNames();

}
 
开发者ID:fipsi7,项目名称:Minecraft_on_Fire,代码行数:11,代码来源:MOF.java

示例15: load

import cpw.mods.fml.common.Mod.Init; //导入依赖的package包/类
@Init
public void load(FMLInitializationEvent event) 
{       
    GameRegistry.registerBlock(lavaBrick, "lavaBrick");
    
    LanguageRegistry.addName(lavaBrick, "Lava Brick");
}
 
开发者ID:kez96,项目名称:Badger-Mod,代码行数:8,代码来源:BadgerMod.java


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