Fixed fluid syncing issues, fixed liquid item dropping when block broken
This commit is contained in:
parent
f5bd04db3c
commit
755c64369a
7 changed files with 30 additions and 8 deletions
|
@ -16,6 +16,7 @@ public class TileAesu extends TileEntityElectricBlock implements IWrenchable {
|
|||
public static final int MAX_STORAGE = 1000000000; //One billion!
|
||||
public Inventory inventory = new Inventory(2, "TileAesu", 64);
|
||||
private int OUTPUT = 64; //The current output
|
||||
private double euLastTick = 0;
|
||||
|
||||
public TileAesu()
|
||||
{
|
||||
|
@ -26,7 +27,7 @@ public class TileAesu extends TileEntityElectricBlock implements IWrenchable {
|
|||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
|
||||
euLastTick = energy;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -115,4 +116,9 @@ public class TileAesu extends TileEntityElectricBlock implements IWrenchable {
|
|||
LogHelper.debug("Set output to " + getOutput());
|
||||
}
|
||||
|
||||
public double getEuChange(){
|
||||
return energy - euLastTick;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -157,7 +157,8 @@ public class TileDieselGenerator extends TileEntity implements IWrenchable,
|
|||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
if(!worldObj.isRemote)
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
energySource.updateEntity();
|
||||
if (tank.getFluidAmount() > 0
|
||||
&& energySource.getCapacity() - energySource.getEnergyStored() >= euTick)
|
||||
|
|
|
@ -180,7 +180,8 @@ public class TileSemifluidGenerator extends TileEntity implements IWrenchable,
|
|||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
if(!worldObj.isRemote)
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
energySource.updateEntity();
|
||||
if (tank.getFluidAmount() > 0
|
||||
&& energySource.getCapacity() - energySource.getEnergyStored() >= euTick)
|
||||
|
|
|
@ -163,7 +163,8 @@ public class TileThermalGenerator extends TileEntity implements IWrenchable,
|
|||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
if(!worldObj.isRemote)
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
energySource.updateEntity();
|
||||
if (tank.getFluidAmount() > 0
|
||||
&& energySource.getCapacity() - energySource.getEnergyStored() >= euTick)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue