本文整理汇总了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");
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例5: hideNEIItems
import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
public void hideNEIItems()
{
if (Loader.isModLoaded(ModDetails.MODID_NEI))
{
}
}
示例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();
}
示例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");
}
}
示例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);
}
}
示例9: nerfNonStandardRecipes
import cpw.mods.fml.common.Loader; //导入方法依赖的package包/类
@Override
protected void nerfNonStandardRecipes ()
{
if (Loader.isModLoaded(ModIds.HARVESTCRAFT))
{
nerfHarvestCraftRecipes();
}
}
示例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);
}
}
}
示例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)));
}
示例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();
}
}
示例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" });
}
}
示例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);
}
}
示例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));
}
}