A few fixes
This commit is contained in:
parent
da6c0a2c90
commit
9acc264726
3 changed files with 5 additions and 10 deletions
|
@ -31,7 +31,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
|||
/** How much secondary energy (fuel) this machine uses per tick. */
|
||||
public int SECONDARY_ENERGY_PER_TICK;
|
||||
|
||||
public int MAX_SECONDARY_ENERGY = 200;
|
||||
public static int MAX_GAS = 200;
|
||||
|
||||
public GasTank gasTank;
|
||||
|
||||
|
@ -62,7 +62,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
|||
|
||||
sideConfig = new byte[] {2, 1, 0, 4, 5, 3};
|
||||
|
||||
gasTank = new GasTank(MAX_SECONDARY_ENERGY);
|
||||
gasTank = new GasTank(MAX_GAS);
|
||||
|
||||
inventory = new ItemStack[5];
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
progress = new int[type.processes];
|
||||
isActive = false;
|
||||
|
||||
gasTank = new GasTank(getMaxSecondaryEnergy());
|
||||
gasTank = new GasTank(TileEntityAdvancedElectricMachine.MAX_GAS*tier.processes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -339,14 +339,9 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
return RecipeType.values()[recipeType].getSecondaryEnergyPerTick();
|
||||
}
|
||||
|
||||
public int getMaxSecondaryEnergy()
|
||||
{
|
||||
return RecipeType.values()[recipeType].getMaxSecondaryEnergy()*tier.processes;
|
||||
}
|
||||
|
||||
public void handleSecondaryFuel()
|
||||
{
|
||||
if(inventory[4] != null && RecipeType.values()[recipeType].usesFuel() && gasTank.getStored() < getMaxSecondaryEnergy())
|
||||
if(inventory[4] != null && RecipeType.values()[recipeType].usesFuel() && gasTank.getNeeded() > 0)
|
||||
{
|
||||
if(recipeType == RecipeType.PURIFYING.ordinal())
|
||||
{
|
||||
|
|
|
@ -583,7 +583,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
|
||||
public int getScaledWaterLevel(int i)
|
||||
{
|
||||
return waterTank.getFluid() != null ? waterTank.getFluid().amount*i / getMaxWater() : 0;
|
||||
return getMaxWater() > 0 ? (waterTank.getFluid() != null ? waterTank.getFluid().amount*i / getMaxWater() : 0) : 0;
|
||||
}
|
||||
|
||||
public int getScaledBrineLevel(int i)
|
||||
|
|
Loading…
Reference in a new issue