Fixed PRC energy usage

This commit is contained in:
Aidan C. Brady 2015-03-05 09:07:40 -05:00
parent 1237230637
commit 6d291c8bbc
2 changed files with 3 additions and 2 deletions

View file

@ -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));

View file

@ -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;