fix: max gas
This commit is contained in:
parent
667de6283b
commit
a36693537c
|
@ -4,5 +4,5 @@ FMP_version=1.2.0.347
|
|||
CCLIB_version=1.1.3.141
|
||||
NEI_version=1.0.5.120
|
||||
CCC_version=1.0.7.48
|
||||
mod_version=9.11.0
|
||||
mod_version=9.11.1
|
||||
alt_version=9, 10, 16
|
||||
|
|
|
@ -47,9 +47,14 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
|||
|
||||
public static int MAX_GAS = 210;
|
||||
|
||||
public int maxGas;
|
||||
public GasTank gasTank;
|
||||
public Gas prevGas;
|
||||
|
||||
public TileEntityAdvancedElectricMachine(String soundPath, String name, double perTick, int secondaryPerTick, int ticksRequired, double maxEnergy) {
|
||||
this(soundPath, name, perTick, secondaryPerTick, ticksRequired, maxEnergy, MAX_GAS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advanced Electric Machine -- a machine like this has a total of 4 slots. Input slot (0), fuel slot (1), output slot (2),
|
||||
* energy slot (3), and the upgrade slot (4). The machine will not run if it does not have enough electricity, or if it doesn't have enough
|
||||
|
@ -62,7 +67,7 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
|||
* @param ticksRequired - how many ticks it takes to smelt an item.
|
||||
* @param maxEnergy - maximum amount of energy this machine can hold.
|
||||
*/
|
||||
public TileEntityAdvancedElectricMachine(String soundPath, String name, double perTick, int secondaryPerTick, int ticksRequired, double maxEnergy)
|
||||
public TileEntityAdvancedElectricMachine(String soundPath, String name, double perTick, int secondaryPerTick, int ticksRequired, double maxEnergy, int maxGas)
|
||||
{
|
||||
super(soundPath, name, MekanismUtils.getResource(ResourceType.GUI, "GuiAdvancedMachine.png"), perTick, ticksRequired, maxEnergy);
|
||||
|
||||
|
@ -77,7 +82,8 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
|||
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 1, 0, 3, 0, 2});
|
||||
configComponent.setInputConfig(TransmissionType.ENERGY);
|
||||
|
||||
gasTank = new GasTank(MAX_GAS);
|
||||
this.maxGas = maxGas;
|
||||
gasTank = new GasTank(maxGas);
|
||||
|
||||
inventory = new ItemStack[5];
|
||||
|
||||
|
@ -360,7 +366,7 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
|||
super.readFromNBT(nbtTags);
|
||||
|
||||
gasTank.read(nbtTags.getCompoundTag("gasTank"));
|
||||
gasTank.setMaxGas(MAX_GAS);
|
||||
gasTank.setMaxGas(maxGas);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,8 +16,7 @@ public class TileEntityOsmiumCompressor extends TileEntityAdvancedElectricMachin
|
|||
{
|
||||
public TileEntityOsmiumCompressor()
|
||||
{
|
||||
super("compressor", "OsmiumCompressor", usage.osmiumCompressorUsage, 1, 200, MachineType.OSMIUM_COMPRESSOR.baseEnergy);
|
||||
MAX_GAS = 200; //FIXME with a better fix
|
||||
super("compressor", "OsmiumCompressor", usage.osmiumCompressorUsage, 1, 200, MachineType.OSMIUM_COMPRESSOR.baseEnergy, 200);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,8 +17,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
public class TileEntityTheoreticalElementizer extends TileEntityAdvancedElectricMachine<TheoreticalElementizerRecipe> {
|
||||
|
||||
public TileEntityTheoreticalElementizer() {
|
||||
super("elementizer", "TheoreticalElementizer", 24, 1, 1000, BlockMachine.MachineType.THEORETICAL_ELEMENTIZER.baseEnergy);
|
||||
MAX_GAS = 1000;
|
||||
super("elementizer", "TheoreticalElementizer", 24, 1, 1000, BlockMachine.MachineType.THEORETICAL_ELEMENTIZER.baseEnergy, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue