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


Java Loader.isModLoaded方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.Loader.isModLoaded方法的典型用法代码示例。如果您正苦于以下问题:Java Loader.isModLoaded方法的具体用法?Java Loader.isModLoaded怎么用?Java Loader.isModLoaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.Loader的用法示例。


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

示例1: init

import cpw.mods.fml.common.Loader; //导入方法依赖的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

示例2: initialize

import cpw.mods.fml.common.Loader; //导入方法依赖的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

示例3: doOtherModsTorches

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
private static void doOtherModsTorches()
   {
       BlockUnlitTorch torch;
       BlockUnlitTorch torchLit;
       
       if (Loader.isModLoaded("TConstruct"))
       {
    	Block modTorch = null; 
    	try {
    		//tconstruct.world.TinkerWorld.stoneTorch
    		Class clazz = Class.forName("tconstruct.world.TinkerWorld");
    		modTorch = (Block) clazz.getField("stoneTorch").get(null);
    	} catch (Exception e) { }
    	if (modTorch != null)
    	{
        	torch = new BlockUnlitTorch(false, "unlitTorch_Stone");
	        torchLit = new BlockUnlitTorch(true, "unlitTorchLit_Stone");
	        GCBlocks.hiddenBlocks.add(torch);
	        GCBlocks.hiddenBlocks.add(torchLit);
	        GCBlocks.otherModTorchesLit.add(torchLit);
	        GameRegistry.registerBlock(torch, ItemBlockGC.class, torch.getUnlocalizedName());
	        GameRegistry.registerBlock(torchLit, ItemBlockGC.class, torchLit.getUnlocalizedName());
	        BlockUnlitTorch.register(torch, torchLit, modTorch);
    	}
       }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:27,代码来源:GCBlocks.java

示例4: registerImplementation

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public static void registerImplementation(IServerHost plugin)
{
    if (Loader.isModLoaded("minetogether"))
    {
        Object mod = Loader.instance().getIndexedModList().get("minetogether").getMod();
        ((ICreeperHostMod) mod).registerImplementation(plugin);
    }
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:9,代码来源:CreeperHostAPI.java

示例5: hideNEIItems

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
public void hideNEIItems()
{
	if (Loader.isModLoaded(ModDetails.MODID_NEI))
	{
	}
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:8,代码来源:ModClientProxy.java

示例6: preInit

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    if (event.getSide() == Side.CLIENT) {
        ConfigLoader.init(event);
        isCustomStuff2Loaded = Loader.isModLoaded("CustomStuff2");
    }
    new CNPNetwork();
}
 
开发者ID:GWYOG,项目名称:CustomNEIPlugins,代码行数:9,代码来源:CustomNEIPlugins.java

示例7: registerTileEntities

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public void registerTileEntities()
{
	GameRegistry.registerTileEntity(TEBrickOven.class, "TEBrickOven");
			
	if(Loader.isModLoaded("Steamcraft"))
	{
		GameRegistry.registerTileEntity(TEBoiler.class, "TEBoiler");
		GameRegistry.registerTileEntity(TEFlashBoiler.class, "TEFlashBoiler");
	}
	if(Loader.isModLoaded("necromancy"))
	{
		GameRegistry.registerTileEntity(TEAltar.class, "TEAltar");
	}
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:15,代码来源:CommonProxy.java

示例8: init

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public static void init()
{
    if (Loader.isModLoaded("ThermalExpansion"))
    {
        Item capItemTE = GameRegistry.findItem("ThermalExpansion", "capacitor");
        capTEBasic = new ItemStack(capItemTE, 1, 2);
        capTEHardened = new ItemStack(capItemTE, 1, 3);
        capTEReinforced = new ItemStack(capItemTE, 1, 4);
        capTEResonant = new ItemStack(capItemTE, 1, 5);

        coil = TEItems.powerCoilGold.copy();

        fluidEnder = new FluidStack(TFFluids.fluidEnder, 1000);
    }

    if (Loader.isModLoaded("EnderIO"))
    {
        Item capItemEIO = GameRegistry.findItem("EnderIO", "itemBasicCapacitor");
        capEIOBasic = new ItemStack(capItemEIO, 1, 0);
        capEIODouble = new ItemStack(capItemEIO, 1, 1);
        capEIOVibrant = new ItemStack(capItemEIO, 1, 2);

        Item alloyItem = GameRegistry.findItem("EnderIO", "itemAlloy");
        ingotElectricalSteel = new ItemStack(alloyItem, 1, 0);
        ingotConductiveIron = new ItemStack(alloyItem, 1, 4);
        ingotEnergeticAlloy = new ItemStack(alloyItem, 1, 1);
        ingotVibrantAlloy = new ItemStack(alloyItem, 1, 2);
    }
}
 
开发者ID:XFactHD,项目名称:RFUtilities,代码行数:30,代码来源:MetaItemGetter.java

示例9: nerfNonStandardRecipes

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
protected void nerfNonStandardRecipes ()
{
    if (Loader.isModLoaded(ModIds.HARVESTCRAFT))
    {
        nerfHarvestCraftRecipes();
    }
}
 
开发者ID:UndeadZeratul,项目名称:TWBB-Tweaks,代码行数:9,代码来源:CampfireRecipeTweaks.java

示例10: loadTcon

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public void loadTcon() {
    if (Loader.isModLoaded("TConstruct")) {
        ILoading r = null;
        try {
            final Class<?> clazz = Class.forName("com.rwtema.extrautils.modintegration.TConIntegration");
            r = (ILoading)clazz.newInstance();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        if (r != null) {
            this.loaders.add(r);
        }
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:16,代码来源:ExtraUtils.java

示例11: preInit

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	isPlanetsLoaded = Loader.isModLoaded(Constants.MOD_ID_PLANETS);
	GCCoreUtil.nextID = 0;
	
	MinecraftForge.EVENT_BUS.register(new EventHandlerGC());
    handler = new GCPlayerHandler();
    MinecraftForge.EVENT_BUS.register(handler);
    FMLCommonHandler.instance().bus().register(handler);
    GalacticraftCore.proxy.preInit(event);
    
    ConnectionPacket.bus = NetworkRegistry.INSTANCE.newEventDrivenChannel(ConnectionPacket.CHANNEL);
    ConnectionPacket.bus.register(new ConnectionPacket());

    ConfigManagerCore.initialize(new File(event.getModConfigurationDirectory(), GalacticraftCore.CONFIG_FILE));
    EnergyConfigHandler.setDefaultValues(new File(event.getModConfigurationDirectory(), GalacticraftCore.POWER_CONFIG_FILE));
    ChunkLoadingCallback.loadConfig(new File(event.getModConfigurationDirectory(), GalacticraftCore.CHUNKLOADER_CONFIG_FILE));

    this.registerOilandFuel();

    if (Loader.isModLoaded("PlayerAPI"))
    {
        ServerPlayerAPI.register(Constants.MOD_ID_CORE, GCPlayerBaseMP.class);
    }

    GCBlocks.initBlocks();
    GCItems.initItems();

    //Allow canisters to be filled from other mods' tanks containing fuel / oil fluids
    FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidFuel, 1000), new ItemStack(GCItems.fuelCanister, 1, 1), new ItemStack(GCItems.oilCanister, 1, ItemCanisterGeneric.EMPTY)));
    FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidOil, 1000), new ItemStack(GCItems.oilCanister, 1, 1), new ItemStack(GCItems.oilCanister, 1, ItemCanisterGeneric.EMPTY)));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:34,代码来源:GalacticraftCore.java

示例12: postInit

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public void postInit(final FMLPostInitializationEvent evt) {
    ForgeChunkManager.setForcedChunkLoadingCallback((Object)ExtraUtilsMod.instance, (ForgeChunkManager.LoadingCallback)new ChunkloadCallback());
    CommandTPSTimer.init();
    if (ExtraUtils.underdarkDimID != 0 && ExtraUtils.portalEnabled) {
        FMLCommonHandler.instance().bus().register((Object)new DarknessTickHandler());
    }
    if (ExtraUtils.divisionSigilEnabled && !ExtraUtils.disableDivisionSigilInChests) {
        this.addSigil("dungeonChest", 0.01);
        this.addSigil("mineshaftCorridor", 0.001);
        this.addSigil("pyramidDesertyChest", 0.02);
        this.addSigil("pyramidJungleChest", 0.05);
        this.addSigil("strongholdCrossing", 0.01);
        this.addSigil("strongholdCorridor", 0.01);
    }
    if (!ExtraUtils.disableEnderLiliesInDungeons && ExtraUtils.enderLily != null) {
        addDungeonItem(new ItemStack((Block)ExtraUtils.enderLily), 1, 5, "dungeonChest", 0.03);
    }
    ExtraUtilsMod.proxy.postInit();
    if (ExtraUtils.enderQuarryEnabled) {
        BlockBreakingRegistry.instance.setupBreaking();
    }
    DispenserStuff.registerItems();
    if (ExtraUtils.generatorEnabled) {
        TileEntityGeneratorPotion.genPotionLevels();
    }
    if (ExtraUtils.transferPipeEnabled) {
        TNHelper.initBlocks();
    }
    if (Loader.isModLoaded("Thaumcraft")) {
        ThaumcraftHelper.registerItems();
    }
    for (final ILoading loader : this.loaders) {
        loader.postInit();
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:36,代码来源:ExtraUtils.java

示例13: postinit

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
public void postinit(FMLPostInitializationEvent event) {
	Register.addPulverizerRecipe(2400, new ItemStack(steelBlock), new ItemStack(RorysMod.items.steelDust, 9));
	Register.addPulverizerRecipe(2400, new ItemStack(solderBlock), new ItemStack(RorysMod.items.solderDust, 9));
	if (Loader.isModLoaded("ThermalExpansion")) {
		Register.addShapedRecipie(new ItemStack(renamer), new Object[] { " n ", "gmg", "csc", 'n', Items.name_tag, 'g', "blockGlass", 'm', "thermalexpansion:machineFrame", 'c', "gearCopper", 's', "plateSteel" });
	}
}
 
开发者ID:roryclaasen,项目名称:RorysMod,代码行数:9,代码来源:ModBlocks.java

示例14: preInit

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent event)
{
    ClientProxyCore.scaleup.put(ClientProxyCore.numbers, 0, 16);

    ClientProxyCore.renderIndexSensorGlasses = RenderingRegistry.addNewArmourRendererPrefix("sensor");
    ClientProxyCore.renderIndexHeavyArmor = RenderingRegistry.addNewArmourRendererPrefix("titanium");

    if (Loader.isModLoaded("PlayerAPI"))
    {
        ClientPlayerAPI.register(Constants.MOD_ID_CORE, GCPlayerBaseSP.class);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:ClientProxyCore.java

示例15: registerAddons

import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
public static void registerAddons() {
	
	//Halloween Addon
	if(Loader.isModLoaded("epicproportionsmod_halloween")){
		//Halloween Addon
		AddonName.add(0, "Halloween Addon");
		AddonId.add(0, "epicproportionsmod_halloween");
		AddonVersion.add(0, "1.0.1.1");
		AddonAuthor.add(0, "jtrent238");
		halloweenloaded = true;
	}
		else
			System.out.println("Halloween Addon NOT FOUND!!!");
	
	//Christmas Addon
	if(Loader.isModLoaded("epicproportionsmod_christmas")){
		AddonName.add(1, "Christmas Addon");
		AddonId.add(1, "epicproportionsmod_christmas");
		AddonVersion.add(1, "1.0.0.0");
		AddonAuthor.add(1, "jtrent238");
		christmasloaded = true;
	}
		else
			System.out.println("Christmas Addon NOT FOUND!!!");
	
	if(halloweenloaded == true){
		System.out.println(AddonName.get(0) + " FOUND");
		System.out.println(name + AddonName.get(0));
		System.out.println(id + AddonId.get(0));
		System.out.println(version + AddonVersion.get(0));
		System.out.println(author + AddonAuthor.get(0));
	}
	if(christmasloaded == true){
		System.out.println(AddonName.get(1) + " FOUND");
		System.out.println(name + AddonName.get(1));
		System.out.println(id + AddonId.get(1));
		System.out.println(version + AddonVersion.get(1));
		System.out.println(author + AddonAuthor.get(1));
	}
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:41,代码来源:AddonManager.java


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