Tweaked battery balance

This commit is contained in:
Calclavia 2014-01-19 12:16:15 +08:00
parent 1b17e38217
commit e8623ff70f
2 changed files with 8 additions and 5 deletions

View file

@ -143,7 +143,7 @@ public class ItemBlockBattery extends ItemBlock implements IEnergyItem, IVoltage
@Override
public long getEnergyCapacity(ItemStack theItem)
{
return TileBattery.STORAGE;
return TileBattery.getEnergyForTier(theItem.getItemDamage());
}
public long getTransferRate(ItemStack itemStack)

View file

@ -31,10 +31,8 @@ import cpw.mods.fml.common.network.PacketDispatcher;
*/
public class TileBattery extends TileElectrical implements IConnector<BatteryStructure>, IVoltageInput, IVoltageOutput, IPacketSender, IPacketReceiver, IEnergyInterface, IEnergyContainer
{
public static final long STORAGE = 1000000000;
/** The transfer rate **/
public static final long DEFAULT_WATTAGE = (long) (STORAGE * 0.01);
public static final long DEFAULT_WATTAGE = (long) (getEnergyForTier(1) * 0.01);
/** Voltage increases as series connection increases */
public static final long DEFAULT_VOLTAGE = UniversalElectricity.DEFAULT_VOLTAGE;
@ -49,10 +47,15 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryStr
public TileBattery()
{
this.energy = new EnergyStorageHandler(STORAGE);
this.energy = new EnergyStorageHandler(getEnergyForTier(1));
this.saveIOMap = true;
}
public static long getEnergyForTier(int tier)
{
return (long) Math.pow(1000000, tier);
}
@Override
public void initiate()
{