Use IC2 Api to get tier.

This commit is contained in:
AlgorithmX2 2014-06-28 18:02:14 -05:00
parent 6718fae629
commit b3cb822d1d

View file

@ -223,15 +223,9 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
return 4;
}
private int calculateTierFromVoltage(double outputVoltageA2)
private int calculateTierFromVoltage(double voltage)
{
for (int x = 8; x >= 0; x--)
{
double top = ic2.api.energy.EnergyNet.instance.getPowerFromTier( x );
if ( outputVoltageA2 > top && top > 0 )
return x + 1;
}
return 0;
return ic2.api.energy.EnergyNet.instance.getTierFromPower( voltage );
}
}