Skip to content

Commit

Permalink
Tinker Table displays stats of tool in center slot
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 24, 2014
1 parent 1d4ca5c commit 16fd95d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/tconstruct/tools/gui/CraftingStationGui.java
Expand Up @@ -109,14 +109,21 @@ protected void drawGuiContainerForegroundLayer (int par1, int par2)

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;
Expand All @@ -126,7 +133,6 @@ void drawToolStats ()
descX += 122;
}

ItemStack stack = logic.getStackInSlot(0);
if (stack.getItem() instanceof ToolCore)
{
ToolCore tool = (ToolCore) stack.getItem();
Expand Down

0 comments on commit 16fd95d

Please sign in to comment.