From 98d54916cc9aee458d63dc78ba8ae32c4f5ff850 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sun, 24 Aug 2014 20:49:52 +0200 Subject: [PATCH] Do what this todo says and update the FuelGauge when opening smeltery gui. Seems to work quite well? --- src/main/java/tconstruct/smeltery/gui/SmelteryGui.java | 8 ++++++++ .../java/tconstruct/smeltery/logic/SmelteryLogic.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/smeltery/gui/SmelteryGui.java b/src/main/java/tconstruct/smeltery/gui/SmelteryGui.java index 3acc15fdb20..ae2b0fe482d 100644 --- a/src/main/java/tconstruct/smeltery/gui/SmelteryGui.java +++ b/src/main/java/tconstruct/smeltery/gui/SmelteryGui.java @@ -46,6 +46,14 @@ public SmelteryGui(InventoryPlayer inventoryplayer, SmelteryLogic smeltery, Worl smeltery.updateFuelDisplay(); } + @Override + public void initGui() { + super.initGui(); + + if(logic != null) + logic.updateFuelGague(); + } + @Override public void drawScreen (int mouseX, int mouseY, float par3) { diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java index 7c61731ae8d..650f8ba68d1 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java @@ -564,7 +564,7 @@ public void updateFuelDisplay () } - void updateFuelGague () // TODO: Call this method when the GUI is opened + public void updateFuelGague () { if (activeLavaTank == null || useTime > 0) return;