StencilTable: Fix derpyness with stencil saving and free toolrod-stencil with empty stencil table.

This commit is contained in:
Bernhard Bonigl committed 2014-08-29 14:44:45 +02:00
1 parent 9ee7bd6553
commit ed90124e98
1 file changed
+7 -3
@@ -97,11 +97,15 @@ public class StencilTableGui extends GuiContainer
}
// get the correct setting :I
if(logic.getStackInSlot(1) != null)
ItemStack stack;
if(logic.getStackInSlot(1) != null) {
activeButton = StencilBuilder.getIndex(logic.getStackInSlot(1));
setActiveButton(activeButton);
stack = StencilBuilder.getStencil(((GuiButtonStencil) this.buttonList.get(activeButton)).element.stencilIndex);
}
else
stack = null;
setActiveButton(activeButton);
ItemStack stack = StencilBuilder.getStencil(((GuiButtonStencil)this.buttonList.get(activeButton)).element.stencilIndex);
logic.setSelectedPattern(stack);
updateServer(stack);
}