本文整理汇总了Java中buildcraft.api.power.PowerHandler.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于buildcraft.api.power.PowerHandler包,在下文中一共展示了Type类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: pushOutEnergy
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
private void pushOutEnergy()
{
ForgeDirection side = getOrientation();
TileEntity output = worldObj.getBlockTileEntity(xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ);
if (output instanceof IPowerReceptor)
{
IPowerReceptor receptor = (IPowerReceptor) output;
PowerReceiver reciver = receptor.getPowerReceiver(side);
if (reciver != null)
{
float amount = reciver.receiveEnergy(Type.ENGINE, m_StoredMJ, side.getOpposite());
m_StoredMJ -= amount;
}
}
}
开发者ID:kiljacken,项目名称:AestusCraft,代码行数:18,代码来源:TileEricssonEngine.java
示例2: sendPower
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
private void sendPower()
{
TileEntity tile = this.tilesOnSides[this.orientation.ordinal()];
if (tile instanceof IPowerReceptor)
{
if (((IPowerReceptor)tile).getPowerReceiver(this.orientation) != null)
{
PowerReceiver receptor = ((IPowerReceptor)tile).getPowerReceiver(this.orientation);
float needed = extractEnergy(receptor.getMinEnergyReceived(), receptor.getMaxEnergyReceived(), false);
if (needed > 0)
{
currentOutput = receptor.receiveEnergy(PowerHandler.Type.ENGINE, needed, this.orientation.getOpposite());
extractEnergy(receptor.getMinEnergyReceived(), currentOutput, true);
}
}
}
}
开发者ID:adamros,项目名称:Transducers,代码行数:20,代码来源:AbstractElectricEngine.java
示例3: TileFrictionHeater
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
public TileFrictionHeater()
{
super(1600);
m_Active = false;
m_PowerHandler = new PowerHandler(this, Type.MACHINE);
m_PowerHandler.configure(100, 200, 0, 1600);
m_PowerHandler.configurePowerPerdition(1, 1);
m_UpdateTicks = 100;
m_RecievedEnergy = false;
}
开发者ID:kiljacken,项目名称:AestusCraft,代码行数:12,代码来源:TileFrictionHeater.java
示例4: HighThroughputPowerPipe
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
public HighThroughputPowerPipe(int itemID)
{
super(new PipeTransportPower(), itemID);
powerHandler = new PowerHandler(this, Type.PIPE);
this.powerHandler.configure(1F, 4096F, 1F, 2000F);
this.powerHandler.configurePowerPerdition(1, 100);
transport.powerCapacities.put(HighThroughputPowerPipe.class, 4096);
transport.initFromPipe(getClass());
}
开发者ID:adamros,项目名称:Transducers,代码行数:10,代码来源:HighThroughputPowerPipe.java
示例5: TilePulverizier
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
public TilePulverizier() {
powerHandler = new PowerHandler(this, Type.MACHINE);
initPowerProvider();
}
开发者ID:ZippyIO,项目名称:IgnitionUtilities,代码行数:5,代码来源:TilePulverizier.java
示例6: TileEntityUniversalConductor
import buildcraft.api.power.PowerHandler.Type; //导入依赖的package包/类
public TileEntityUniversalConductor()
{
this.powerHandler = new PowerHandler(this, Type.PIPE);
this.powerHandler.configure(0, this.buildcraftBuffer, this.buildcraftBuffer, this.buildcraftBuffer * 2);
this.powerHandler.configurePowerPerdition(0, 0);
}
开发者ID:tterrag1098,项目名称:SimpleTransmutations,代码行数:7,代码来源:TileEntityUniversalConductor.java
注:本文中的buildcraft.api.power.PowerHandler.Type类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论