worked on steam gen a bit

This commit is contained in:
DarkGuardsman 2013-11-27 10:23:49 -05:00
parent a9c084c8d4
commit b82fc60928

View file

@ -34,33 +34,23 @@ public class TileEntitySteamGen extends TileEntityMachine implements IFluidHandl
public void updateEntity()
{
super.updateEntity();
TileEntity entity = this.worldObj.getBlockTileEntity(xCoord, yCoord + 1, zCoord);
this.creatingSteam = false;
steamMachineConnected = false;
if (itemCookTime > 0)
{
itemCookTime--;
}
else
{
heatTicks--;
}
if (entity instanceof TileEntitySteamPiston)
{
steamMachineConnected = true;
if (itemCookTime < 10)
{
this.consumeFuel();
if (itemCookTime <= 0)
{
if (heatTicks > 0)
heatTicks--;
}
if (itemCookTime > 0 && this.heatTicks < HEAT_TIME)
}
else if (this.heatTicks < HEAT_TIME)
{
heatTicks++;
}
if (this.isFunctioning())
{
if (this.tank != null && this.tank.getFluid() != null && this.tank.getFluidAmount() > 1 && this.tank.getFluid().getFluid() == FluidRegistry.WATER)
if (this.tank != null && this.tank.getFluid() != null && this.tank.getFluidAmount() > 1 && this.tank.getFluid().isFluidEqual(new FluidStack(FluidRegistry.WATER, 1000)))
{
this.tank.drain(1, true);
this.creatingSteam = true;
@ -72,7 +62,6 @@ public class TileEntitySteamGen extends TileEntityMachine implements IFluidHandl
}
}
}
}
/** Called when the generator is running low on energy and needs to burn more fuel to keep going */
public void consumeFuel()