Use IC2 Api to get tier.
This commit is contained in:
@@ -223,15 +223,9 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateTierFromVoltage(double outputVoltageA2)
|
private int calculateTierFromVoltage(double voltage)
|
||||||
{
|
{
|
||||||
for (int x = 8; x >= 0; x--)
|
return ic2.api.energy.EnergyNet.instance.getTierFromPower( voltage );
|
||||||
{
|
|
||||||
double top = ic2.api.energy.EnergyNet.instance.getPowerFromTier( x );
|
|
||||||
if ( outputVoltageA2 > top && top > 0 )
|
|
||||||
return x + 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user