Tiny cleanup
This commit is contained in:
parent
854c909c4c
commit
4964c1689f
8 changed files with 11 additions and 11 deletions
|
@ -134,7 +134,7 @@ public class RenderPartTransmitter implements IIconRegister
|
||||||
|
|
||||||
if(Math.abs(pipe.currentScale - targetScale) > 0.01)
|
if(Math.abs(pipe.currentScale - targetScale) > 0.01)
|
||||||
{
|
{
|
||||||
pipe.currentScale = (9 * pipe.currentScale + targetScale) / 10;
|
pipe.currentScale = (12 * pipe.currentScale + targetScale) / 13;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pipe.currentScale = targetScale;
|
pipe.currentScale = targetScale;
|
||||||
|
|
|
@ -816,7 +816,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, IItem
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy(ItemStack itemStack)
|
public double getMaxEnergy(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
return MekanismUtils.getEnergy(getEnergyMultiplier(itemStack), MachineType.get(itemStack.itemID, itemStack.getItemDamage()).baseEnergy);
|
return MekanismUtils.getMaxEnergy(getEnergyMultiplier(itemStack), MachineType.get(itemStack.itemID, itemStack.getItemDamage()).baseEnergy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -312,9 +312,9 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
case 5:
|
case 5:
|
||||||
return new Object[] {canOperate()};
|
return new Object[] {canOperate()};
|
||||||
case 6:
|
case 6:
|
||||||
return new Object[] {MekanismUtils.getEnergy(getEnergyMultiplier(), getMaxEnergy())};
|
return new Object[] {MekanismUtils.getMaxEnergy(getEnergyMultiplier(), getMaxEnergy())};
|
||||||
case 7:
|
case 7:
|
||||||
return new Object[] {(MekanismUtils.getEnergy(getEnergyMultiplier(), getMaxEnergy())-getEnergy())};
|
return new Object[] {(MekanismUtils.getMaxEnergy(getEnergyMultiplier(), getMaxEnergy())-getEnergy())};
|
||||||
default:
|
default:
|
||||||
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
|
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
|
||||||
return new Object[] {"Unknown command."};
|
return new Object[] {"Unknown command."};
|
||||||
|
|
|
@ -215,7 +215,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy()
|
public double getMaxEnergy()
|
||||||
{
|
{
|
||||||
return MekanismUtils.getEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
return MekanismUtils.getMaxEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -804,7 +804,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy()
|
public double getMaxEnergy()
|
||||||
{
|
{
|
||||||
return MekanismUtils.getEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
return MekanismUtils.getMaxEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -740,7 +740,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy()
|
public double getMaxEnergy()
|
||||||
{
|
{
|
||||||
return MekanismUtils.getEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
return MekanismUtils.getMaxEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -490,7 +490,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy()
|
public double getMaxEnergy()
|
||||||
{
|
{
|
||||||
return MekanismUtils.getEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
return MekanismUtils.getMaxEnergy(getEnergyMultiplier(), MAX_ELECTRICITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -618,7 +618,7 @@ public final class MekanismUtils
|
||||||
*/
|
*/
|
||||||
public static double getEnergyPerTick(int speedUpgrade, int energyUpgrade, double def)
|
public static double getEnergyPerTick(int speedUpgrade, int energyUpgrade, double def)
|
||||||
{
|
{
|
||||||
return (def * Math.pow(10, ((speedUpgrade-energyUpgrade)/9.0)));
|
return def * Math.pow(10, ((speedUpgrade-energyUpgrade)/9.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -627,9 +627,9 @@ public final class MekanismUtils
|
||||||
* @param def - original, default max energy
|
* @param def - original, default max energy
|
||||||
* @return max energy
|
* @return max energy
|
||||||
*/
|
*/
|
||||||
public static double getEnergy(int energyUpgrade, double def)
|
public static double getMaxEnergy(int energyUpgrade, double def)
|
||||||
{
|
{
|
||||||
return (int)(def * Math.pow(10, (energyUpgrade/9.0)));
|
return def * Math.pow(10, (energyUpgrade/9.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue