From 16fd95d3a255e7a6a85af3982582407d1ce1290a Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Wed, 24 Sep 2014 11:55:59 +0200 Subject: [PATCH] Tinker Table displays stats of tool in center slot --- .../tconstruct/tools/gui/CraftingStationGui.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/tconstruct/tools/gui/CraftingStationGui.java b/src/main/java/tconstruct/tools/gui/CraftingStationGui.java index c9e2f5e6..d10bf69b 100644 --- a/src/main/java/tconstruct/tools/gui/CraftingStationGui.java +++ b/src/main/java/tconstruct/tools/gui/CraftingStationGui.java @@ -109,14 +109,21 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler if (logic.tinkerTable) { - if (logic.isStackInSlot(0)) - drawToolStats(); + if (logic.isStackInSlot(0)) // output slot = modified item + drawToolStats(logic.getStackInSlot(0)); + else if (logic.isStackInSlot(5)) // center slot if no output item + { + // other slots empty? + if(!logic.isStackInSlot(1) && !logic.isStackInSlot(2) && !logic.isStackInSlot(3) && !logic.isStackInSlot(4) + && !logic.isStackInSlot(6) && !logic.isStackInSlot(7) && !logic.isStackInSlot(8) && !logic.isStackInSlot(9)) + drawToolStats(logic.getStackInSlot(5)); + } else drawToolInformation(); } } - void drawToolStats () + void drawToolStats (ItemStack stack) { int offsetX = 239; int descX = 186; @@ -126,7 +133,6 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler descX += 122; } - ItemStack stack = logic.getStackInSlot(0); if (stack.getItem() instanceof ToolCore) { ToolCore tool = (ToolCore) stack.getItem();