Liquid boiler functional. Displays all fuels as looking like whale oil for now.
parent
e34622f466
commit
0f1ca09348
|
@ -15,8 +15,6 @@ package steamcraft.client.gui;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import boilerplate.client.BaseContainerGui;
|
||||
|
@ -56,14 +54,9 @@ public class GuiLiquidBoiler extends BaseContainerGui
|
|||
this.drawTexturedModalRect(this.guiLeft + 43, (this.guiTop + 48) - burnTime, 176, 12 - burnTime, 14, burnTime + 2);
|
||||
}
|
||||
|
||||
this.drawFluid(FluidRegistry.getFluid("water"), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 8, 20, 60);
|
||||
if (this.boiler.fuelTank.getFluid() != null)
|
||||
{
|
||||
this.drawFluid(this.boiler.fuelTank.getFluid().getFluid(), this.boiler.getScaledFuelLevel(60), this.guiLeft + 20, this.guiTop + 8, 20,
|
||||
60);
|
||||
FMLLog.info("" + this.boiler.getScaledFuelLevel(60), "" + this.boiler.getScaledFuelLevel(60));
|
||||
}
|
||||
this.drawFluid(FluidRegistry.getFluid("steam"), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 8, 32, 60);
|
||||
this.drawFluid(FluidRegistry.getFluid("water"), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 9, 20, 60);
|
||||
this.drawFluid(FluidRegistry.getFluid("whaleoil"), this.boiler.getScaledFuelLevel(60), this.guiLeft + 40, this.guiTop + 9, 20, 60);
|
||||
this.drawFluid(FluidRegistry.getFluid("steam"), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 9, 32, 60);
|
||||
|
||||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft + 8, this.guiTop + 15, 176, 14, 20, 49);
|
||||
|
@ -79,7 +72,7 @@ public class GuiLiquidBoiler extends BaseContainerGui
|
|||
this.drawFluidInfo(this.boiler.waterTank, x, y);
|
||||
else if (((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
|
||||
this.drawFluidInfo(this.boiler.steamTank, x, y);
|
||||
else if (((x - this.guiLeft) >= 40) && ((x - this.guiLeft) <= 60))
|
||||
this.drawFluidInfo(this.boiler.fuelTank, x, y);
|
||||
// else if (((x - this.guiLeft) >= 40) && ((x - this.guiLeft) <= 60))
|
||||
// this.drawFluidInfo(this.boiler.fuelTank, x, y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,13 +161,15 @@ public class TileLiquidBoiler extends TileBaseBoiler implements IOpenableGUI
|
|||
}
|
||||
}
|
||||
// Burn fuel
|
||||
if ((this.furnaceBurnTime == 0) && (this.waterTank.getFluidAmount() >= waterPerTick)
|
||||
&& (this.steamTank.fill(new FluidStack(FluidRegistry.getFluid("steam"), steamPerTick), false) > 0)
|
||||
&& (this.fuelTank.getFluidAmount() >= fuelPerTick))
|
||||
if ((this.furnaceBurnTime == 0) && this.fuelTank.getFluid() != null)
|
||||
{
|
||||
this.furnaceBurnTime = this.getFuelBurnTime(this.fuelTank.getFluid().getFluid());
|
||||
this.fuelTank.drain(fuelPerTick, true);
|
||||
|
||||
}
|
||||
if (this.furnaceBurnTime != 0 && (this.waterTank.getFluidAmount() >= waterPerTick)
|
||||
&& (this.steamTank.fill(new FluidStack(FluidRegistry.getFluid("steam"), steamPerTick), false) > 0)
|
||||
&& (this.fuelTank.getFluidAmount() >= fuelPerTick))
|
||||
this.fuelTank.drain(fuelPerTick, true);
|
||||
// Produce steam
|
||||
if ((this.furnaceBurnTime > 0) && (this.waterTank.getFluidAmount() >= waterPerTick) && (this.fuelTank.getFluidAmount() >= fuelPerTick)
|
||||
&& (this.steamTank.getFluidAmount() < this.steamTank.getCapacity()))
|
||||
|
|
|
@ -130,8 +130,8 @@ public class ContainerLiquidBoiler extends BaseContainer
|
|||
this.tileent.furnaceBurnTime = par2;
|
||||
else if (par1 == 1)
|
||||
this.tileent.steamTank.setFluid(new FluidStack(FluidRegistry.getFluid("steam"), par2));
|
||||
else if (par1 == 2 && this.tileent.fuelTank.getFluid() != null)
|
||||
this.tileent.fuelTank.getFluid().amount = par2;
|
||||
else if (par1 == 2)
|
||||
this.tileent.fuelTank.setFluid(new FluidStack(FluidRegistry.getFluid("whaleoil"), par2));
|
||||
else if (par1 == 3)
|
||||
this.tileent.waterTank.setFluid(new FluidStack(FluidRegistry.getFluid("water"), par2));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue