From eb50bb90f3ddc5dc8f96d6b79192b0bbcaa5c6a1 Mon Sep 17 00:00:00 2001 From: Glassmaker Date: Tue, 15 Jul 2014 22:30:03 +0300 Subject: [PATCH] Fixed Lava (Fuel) gague in the smeltery --- src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java index bf231bbc..7c61731a 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java @@ -524,7 +524,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci public void updateFuelDisplay () { - if (activeLavaTank == null || useTime > 0) + if (activeLavaTank == null) return; if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z)) @@ -541,10 +541,10 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci fuelGague = 0; return; } + if (tankContainer instanceof IFluidHandler) { - needsUpdate = true; - FluidStack liquid = ((IFluidHandler) tankContainer).drain(ForgeDirection.DOWN, 150, false); + FluidStack liquid = ((IFluidHandler) tankContainer).drain(ForgeDirection.DOWN, 4000, false); if (liquid != null && liquid.getFluid().getBlock() == Blocks.lava) { FluidTankInfo[] info = ((IFluidHandler) tankContainer).getTankInfo(ForgeDirection.DOWN); @@ -561,6 +561,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci fuelGague = 0; } } + } void updateFuelGague () // TODO: Call this method when the GUI is opened