Fixed PRC energy usage
This commit is contained in:
parent
1237230637
commit
6d291c8bbc
2 changed files with 3 additions and 2 deletions
|
@ -40,7 +40,8 @@ public class GuiPRC extends GuiMekanism
|
|||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
String multiplier = MekanismUtils.getEnergyDisplay(tileEntity.energyPerTick);
|
||||
double extra = tileEntity.getRecipe() != null ? tileEntity.getRecipe().extraEnergy : 0;
|
||||
String multiplier = MekanismUtils.getEnergyDisplay(MekanismUtils.getEnergyPerTick(tileEntity, tileEntity.BASE_ENERGY_PER_TICK + extra));
|
||||
return ListUtils.asList("Using: " + multiplier + "/t", "Needed: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy() - tileEntity.getEnergy()));
|
||||
}
|
||||
}, this, tileEntity.guiLocation));
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
|
|||
|
||||
ChargeUtils.discharge(1, this);
|
||||
|
||||
if(canOperate(recipe) && MekanismUtils.canFunction(this) && getEnergy() >= energyPerTick)
|
||||
if(canOperate(recipe) && MekanismUtils.canFunction(this) && getEnergy() >= MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK + recipe.extraEnergy))
|
||||
{
|
||||
boolean update = BASE_TICKS_REQUIRED != recipe.ticks;
|
||||
|
||||
|
|
Loading…
Reference in a new issue