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


Java Info.isIc2Available方法代码示例

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


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

示例1: discharge

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Discharge the supplied ItemStack into this sink's energy buffer.
 *
 * @param stack ItemStack to discharge (null is ignored)
 * @param limit Transfer limit, values <= 0 will use the battery's limit
 * @return true if energy was transferred
 */
public boolean discharge(ItemStack stack, int limit) {
    if (stack == null || !Info.isIc2Available()) {
        return false;
    }

    double amount = capacity - energyStored;
    if (amount <= 0) {
        return false;
    }

    if (limit > 0 && limit < amount) {
        amount = limit;
    }

    amount = ElectricItem.manager.discharge(stack, amount, tier, limit > 0, true, false);

    energyStored += amount;

    return amount > 0;
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:28,代码来源:BasicSink.java

示例2: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loaded, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
	if (!addedToEnet &&
			!parent.getWorld().isRemote &&
			Info.isIc2Available()) {
		worldObj = parent.getWorld();
		pos = parent.getPos();

		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

		addedToEnet = true;
	}
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:17,代码来源:BasicSink.java

示例3: onChunkUnload

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
 * Both invalidate and onChunkUnload have to be used.
 */
@Override
public void onChunkUnload() {
	if (addedToEnet &&
			Info.isIc2Available()) {
		MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

		addedToEnet = false;
	}
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:14,代码来源:BasicSink.java

示例4: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loading, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
	if (!addedToEnet &&
			!parent.getWorld().isRemote &&
			Info.isIc2Available()) {
		worldObj = parent.getWorld();
		pos = parent.getPos();

		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

		addedToEnet = true;
	}
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:17,代码来源:BasicSource.java

示例5: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loaded, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
	if (!addedToEnet &&
			!FMLCommonHandler.instance().getEffectiveSide().isClient() &&
			Info.isIc2Available()) {
		worldObj = parent.getWorldObj();
		xCoord = parent.xCoord;
		yCoord = parent.yCoord;
		zCoord = parent.zCoord;

		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

		addedToEnet = true;
	}
}
 
开发者ID:nikita488,项目名称:RainbowElectricity,代码行数:19,代码来源:BasicSink.java

示例6: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loading, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
	if (!addedToEnet &&
			!FMLCommonHandler.instance().getEffectiveSide().isClient() &&
			Info.isIc2Available()) {
		worldObj = parent.getWorldObj();
		xCoord = parent.xCoord;
		yCoord = parent.yCoord;
		zCoord = parent.zCoord;

		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

		addedToEnet = true;
	}
}
 
开发者ID:nikita488,项目名称:RainbowElectricity,代码行数:19,代码来源:BasicSource.java

示例7: updateEntity

import ic2.api.info.Info; //导入方法依赖的package包/类
public void updateEntity()
{
	if ((!addedToEnet) && (!FMLCommonHandler.instance().getEffectiveSide().isClient()) && (Info.isIc2Available()))
	{

		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

		addedToEnet = true;
	}
}
 
开发者ID:UnderMybrella,项目名称:Minegate,代码行数:11,代码来源:TileEntityEUProvider.java

示例8: onChunkUnload

import ic2.api.info.Info; //导入方法依赖的package包/类
public void onChunkUnload()
{
	if ((addedToEnet) && (Info.isIc2Available()))
	{
		MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

		addedToEnet = false;
	}
}
 
开发者ID:UnderMybrella,项目名称:Minegate,代码行数:10,代码来源:TileEntityEUProvider.java

示例9: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loaded, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
    if (!addedToEnet &&
        !FMLCommonHandler.instance().getEffectiveSide().isClient() &&
        Info.isIc2Available()) {
        worldObj = parent.getWorldObj();
        xCoord = parent.xCoord;
        yCoord = parent.yCoord;
        zCoord = parent.zCoord;

        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

        addedToEnet = true;
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:19,代码来源:BasicSink.java

示例10: onChunkUnload

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
 * Both invalidate and onChunkUnload have to be used.
 */
@Override
public void onChunkUnload() {
    if (addedToEnet &&
        Info.isIc2Available()) {
        MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

        addedToEnet = false;
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:14,代码来源:BasicSink.java

示例11: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loading, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
    if (!addedToEnet &&
        !FMLCommonHandler.instance().getEffectiveSide().isClient() &&
        Info.isIc2Available()) {
        worldObj = parent.getWorldObj();
        xCoord = parent.xCoord;
        yCoord = parent.yCoord;
        zCoord = parent.zCoord;

        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

        addedToEnet = true;
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:19,代码来源:BasicSource.java

示例12: charge

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Charge the supplied ItemStack from this source's energy buffer.
 *
 * @param stack ItemStack to charge (null is ignored)
 * @return true if energy was transferred
 */
public boolean charge(ItemStack stack) {
    if (stack == null || !Info.isIc2Available()) {
        return false;
    }

    double amount = ElectricItem.manager.charge(stack, energyStored, tier, false, false);

    energyStored -= amount;

    return amount > 0;
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:18,代码来源:BasicSource.java

示例13: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loaded, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
    if (!addedToEnet &&
            !FMLCommonHandler.instance().getEffectiveSide().isClient() &&
            Info.isIc2Available()) {
        worldObj = parent.getWorldObj();
        xCoord = parent.xCoord;
        yCoord = parent.yCoord;
        zCoord = parent.zCoord;

        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

        addedToEnet = true;
    }
}
 
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:19,代码来源:BasicSink.java

示例14: onChunkUnload

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
 * Both invalidate and onChunkUnload have to be used.
 */
@Override
public void onChunkUnload() {
    if (addedToEnet &&
            Info.isIc2Available()) {
        MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

        addedToEnet = false;
    }
}
 
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:14,代码来源:BasicSink.java

示例15: onLoaded

import ic2.api.info.Info; //导入方法依赖的package包/类
/**
 * Notification that the base TileEntity finished loading, for advanced uses.
 * Either updateEntity or onLoaded have to be used.
 */
public void onLoaded() {
    if (!addedToEnet &&
            !FMLCommonHandler.instance().getEffectiveSide().isClient() &&
            Info.isIc2Available()) {
        worldObj = parent.getWorldObj();
        xCoord = parent.xCoord;
        yCoord = parent.yCoord;
        zCoord = parent.zCoord;

        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

        addedToEnet = true;
    }
}
 
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:19,代码来源:BasicSource.java


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