當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。