Merge branch 'development' into 1.8
Conflicts: src/main/java/mekanism/common/util/MekanismUtils.java
This commit is contained in:
commit
0be5320143
3 changed files with 12 additions and 11 deletions
|
@ -267,11 +267,14 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
|||
if(fluidStored != null)
|
||||
{
|
||||
prevTransferAmount = tickEmit(fluidStored, true);
|
||||
fluidStored.amount -= prevTransferAmount;
|
||||
|
||||
if(fluidStored != null && fluidStored.amount <= 0)
|
||||
if(fluidStored != null)
|
||||
{
|
||||
fluidStored = null;
|
||||
fluidStored.amount -= prevTransferAmount;
|
||||
|
||||
if(fluidStored.amount <= 0)
|
||||
{
|
||||
fluidStored = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,17 +237,15 @@ public final class CableUtils
|
|||
{
|
||||
double sent = 0;
|
||||
boolean tryAgain = false;
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
tryAgain = false;
|
||||
|
||||
double prev = sent;
|
||||
sent += emit_do(emitter, outputtingSides, energyToSend-sent, tryAgain);
|
||||
|
||||
if(energyToSend-sent > 0 && sent-prev > 0)
|
||||
{
|
||||
tryAgain = true;
|
||||
}
|
||||
tryAgain = energyToSend-sent > 0 && sent-prev > 0 && i < 100;
|
||||
|
||||
i++;
|
||||
} while(tryAgain);
|
||||
|
||||
emitter.setEnergy(emitter.getEnergy() - sent);
|
||||
|
|
|
@ -634,7 +634,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static int getSecondaryEnergyPerTick(IUpgradeTile mgmt, int def)
|
||||
{
|
||||
return def * (int)Math.pow(general.maxUpgradeMultiplier, mgmt.getComponent().getUpgrades(Upgrade.SPEED)/(float)Upgrade.SPEED.getMax());
|
||||
return (int)(def * Math.pow(general.maxUpgradeMultiplier, mgmt.getComponent().getUpgrades(Upgrade.SPEED)/(float)Upgrade.SPEED.getMax()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue