Fixed the Marx generator not charging past a certain point, closes #39
This commit is contained in:
parent
d51562b937
commit
0eb9a03185
|
@ -105,7 +105,7 @@ public class TileEntityMarx extends TileEntityIWMultiblock implements ITickable,
|
||||||
public FiringState state = FiringState.CHARGING;
|
public FiringState state = FiringState.CHARGING;
|
||||||
public Discharge dischargeData;
|
public Discharge dischargeData;
|
||||||
// Voltage=10*storedJ
|
// Voltage=10*storedJ
|
||||||
private JouleEnergyStorage storage = new JouleEnergyStorage(5_000, 3_200);
|
private JouleEnergyStorage storage = new JouleEnergyStorage(50_000, 20*32_000);
|
||||||
private boolean hasConnection;
|
private boolean hasConnection;
|
||||||
private double[] capVoltages;
|
private double[] capVoltages;
|
||||||
private int voltageControl = 0;
|
private int voltageControl = 0;
|
||||||
|
@ -536,8 +536,10 @@ public class TileEntityMarx extends TileEntityIWMultiblock implements ITickable,
|
||||||
public double insertEnergy(double joules, boolean simulate, EnergyType type) {
|
public double insertEnergy(double joules, boolean simulate, EnergyType type) {
|
||||||
TileEntityMarx master = master(this);
|
TileEntityMarx master = master(this);
|
||||||
if (master!=null) {
|
if (master!=null) {
|
||||||
double ret = master.storage.insert(joules, ConversionUtil.joulesPerEu(), simulate, master.leftover);
|
double ret = master.storage.insert(joules, 1, simulate, master.leftover);
|
||||||
master.leftover -= ret;
|
if (!simulate) {
|
||||||
|
master.leftover -= ret;
|
||||||
|
}
|
||||||
return joules -ret;
|
return joules -ret;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
package malte0811.industrialWires.blocks.wire;
|
package malte0811.industrialWires.blocks.wire;
|
||||||
|
|
||||||
import blusunrize.immersiveengineering.api.IEProperties;
|
import blusunrize.immersiveengineering.api.IEProperties;
|
||||||
|
import malte0811.industrialWires.IWConfig;
|
||||||
import malte0811.industrialWires.IndustrialWires;
|
import malte0811.industrialWires.IndustrialWires;
|
||||||
import malte0811.industrialWires.blocks.BlockIWBase;
|
import malte0811.industrialWires.blocks.BlockIWBase;
|
||||||
import malte0811.industrialWires.blocks.IMetaEnum;
|
import malte0811.industrialWires.blocks.IMetaEnum;
|
||||||
|
@ -163,7 +164,8 @@ public class BlockIC2Connector extends BlockIWBase implements IMetaEnum {
|
||||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.power_tier", (type%5) + 1));
|
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.power_tier", (type%5) + 1));
|
||||||
MixedWireType wire = MixedWireType.ALL[type];
|
MixedWireType wire = MixedWireType.ALL[type];
|
||||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.energy_per_tick",
|
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.energy_per_tick",
|
||||||
wire.getIORate()*ConversionUtil.euPerJoule(), wire.getIORate()*ConversionUtil.ifPerJoule()));
|
wire.getIORate()*ConversionUtil.euPerJoule(),
|
||||||
|
wire.getIORate()*ConversionUtil.ifPerJoule()*IWConfig.wireRatio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue