Balanced out battery a bit
This commit is contained in:
parent
a7d6c94590
commit
941398fa29
4 changed files with 13 additions and 7 deletions
|
@ -167,7 +167,7 @@ public class ItemBlockBattery extends ItemBlock implements IEnergyItem, IVoltage
|
|||
@Override
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (byte tier = 0; tier < 3; tier++)
|
||||
for (byte tier = 0; tier <= TileBattery.MAX_TIER; tier++)
|
||||
{
|
||||
par3List.add(CompatibilityModule.getItemWithCharge(setTier(new ItemStack(this), tier), 0));
|
||||
par3List.add(CompatibilityModule.getItemWithCharge(setTier(new ItemStack(this), tier), TileBattery.getEnergyForTier(tier)));
|
||||
|
|
|
@ -28,6 +28,11 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
*/
|
||||
public class TileBattery extends TileElectrical implements IConnector<BatteryNetwork>, IVoltageInput, IVoltageOutput, IPacketSender, IPacketReceiver, IEnergyInterface, IEnergyContainer
|
||||
{
|
||||
/**
|
||||
* Tiers: 0, 1, 2
|
||||
*/
|
||||
public static final int MAX_TIER = 2;
|
||||
|
||||
/** The transfer rate **/
|
||||
public static final long DEFAULT_WATTAGE = getEnergyForTier(0);
|
||||
|
||||
|
@ -51,7 +56,7 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryNet
|
|||
*/
|
||||
public static long getEnergyForTier(int tier)
|
||||
{
|
||||
return (long) Math.pow(100000, tier + 1) + 900000;
|
||||
return (long) Math.pow(100000000, ((float) tier / (float) (MAX_TIER + 0.1f)) + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,6 +14,7 @@ import resonantinduction.electrical.wire.EnumWireMaterial;
|
|||
import calclavia.lib.utility.LanguageUtility;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
|
@ -63,19 +64,19 @@ public class ItemMultimeter extends ItemMultipartBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
|
||||
{
|
||||
if (par2EntityPlayer.isSneaking())
|
||||
if (ControlKeyModifer.isControlDown(entityPlayer))
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
par2EntityPlayer.addChatMessage(LanguageUtility.getLocal("message.multimeter.onUse").replace("%v", "" + PartMultimeter.getDetectedEnergy(ForgeDirection.getOrientation(par7), world.getBlockTileEntity(x, y, z))));
|
||||
entityPlayer.addChatMessage(LanguageUtility.getLocal("message.multimeter.onUse").replace("%v", "" + PartMultimeter.getDetectedEnergy(ForgeDirection.getOrientation(par7), world.getBlockTileEntity(x, y, z))));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onItemUse(par1ItemStack, par2EntityPlayer, world, x, y, z, par7, par8, par9, par10);
|
||||
return super.onItemUse(par1ItemStack, entityPlayer, world, x, y, z, par7, par8, par9, par10);
|
||||
}
|
||||
|
||||
public float getDetection(ItemStack itemStack)
|
||||
|
|
|
@ -141,7 +141,7 @@ tooltip.noShift=Hold %0shift %1for more information"
|
|||
# %0 is the color for the charge level, %1 is grey to reset it back to normal (optional), %v0 is the current charge, %v1 is the max charge
|
||||
tooltip.battery.energy=Energy: %0%v0 / %v1
|
||||
tooltip.multimeter.line1=Right click click to place,
|
||||
tooltip.multimeter.line2=Shift-right to scan data.
|
||||
tooltip.multimeter.line2=Control right click to scan data.
|
||||
tooltip.multimeter.noSave=No detection saved.
|
||||
tooltip.multimeter.lastSave=Last Detection: %v KJ
|
||||
|
||||
|
|
Loading…
Reference in a new issue