Fixed battery not resetting their transfer rates
This commit is contained in:
parent
e1b0163159
commit
b40e54afc8
3 changed files with 8 additions and 10 deletions
|
@ -78,7 +78,6 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryNet
|
|||
}
|
||||
}
|
||||
|
||||
energy.setMaxTransfer((long) Math.min(Math.pow(1000, this.getNetwork().getConnectors().size()), energy.getEnergyCapacity()));
|
||||
markDistributionUpdate = true;
|
||||
markClientUpdate = true;
|
||||
}
|
||||
|
@ -91,11 +90,13 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryNet
|
|||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
energy.setMaxTransfer((long) Math.min(Math.pow(1000, this.getNetwork().getConnectors().size()), energy.getEnergyCapacity()));
|
||||
|
||||
long produce = this.produce();
|
||||
|
||||
if ((markDistributionUpdate || produce > 0) && ticks % 5 == 0)
|
||||
{
|
||||
this.getNetwork().redistribute();
|
||||
getNetwork().redistribute();
|
||||
markDistributionUpdate = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class TileGenerator extends TileElectrical implements IRotatable
|
|||
|
||||
/** Generator turns KE -> EE. Inverted one will turn EE -> KE. */
|
||||
public boolean isInversed = true;
|
||||
private int torqueRatio = 8000;
|
||||
private int torqueRatio = 5000;
|
||||
|
||||
public TileGenerator()
|
||||
{
|
||||
|
|
|
@ -64,13 +64,13 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
{
|
||||
if (angularVelocity > 0)
|
||||
{
|
||||
torque += 1;
|
||||
angularVelocity += 0.01f;
|
||||
torque += 3;
|
||||
angularVelocity += 0.02f;
|
||||
}
|
||||
else
|
||||
{
|
||||
torque -= 1;
|
||||
angularVelocity -= 0.01f;
|
||||
torque -= 3;
|
||||
angularVelocity -= 0.02f;
|
||||
}
|
||||
|
||||
manualCrankTime--;
|
||||
|
@ -202,7 +202,6 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
if (getMultiBlock().isConstructed() && checkDir != placementSide && checkDir != placementSide.getOpposite())
|
||||
{
|
||||
tile = new universalelectricity.api.vector.Vector3(tile()).translate(checkDir).getTileEntity(world());
|
||||
System.out.println("MOIFIED" + checkDir);
|
||||
}
|
||||
|
||||
if (tile instanceof IMechanical)
|
||||
|
@ -215,8 +214,6 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
|
||||
if (connections[checkDir.ordinal()] == null && instance != this && checkDir != placementSide && instance != null && instance.canConnect(checkDir.getOpposite(), this))
|
||||
{
|
||||
System.out.println("F" + instance);
|
||||
|
||||
connections[checkDir.ordinal()] = instance;
|
||||
getNetwork().merge(instance.getNetwork());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue