diff --git a/src/main/java/tconstruct/tools/logic/StencilTableLogic.java b/src/main/java/tconstruct/tools/logic/StencilTableLogic.java index 5b7cb4c7..eb73eda2 100644 --- a/src/main/java/tconstruct/tools/logic/StencilTableLogic.java +++ b/src/main/java/tconstruct/tools/logic/StencilTableLogic.java @@ -57,16 +57,20 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory if (slot == 0 && itemstack != null && StencilBuilder.isBlank(itemstack)) { setInventorySlotContents(1, selectedStack); + }else{ + selectedStack=null; + setInventorySlotContents(1, selectedStack); } } @Override public ItemStack decrStackSize (int slot, int quantity) { + if (slot == 1) { super.decrStackSize(0, 1); - if (inventory[0] == null) + if (inventory[0] == null || !StencilBuilder.isBlank(inventory[0])) return super.decrStackSize(slot, quantity); else return inventory[1].copy(); @@ -74,7 +78,7 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory else { ItemStack ret = super.decrStackSize(slot, quantity); - if (inventory[0] == null) + if (inventory[0] == null || !StencilBuilder.isBlank(inventory[0])) super.decrStackSize(1, 1); return ret; } @@ -147,4 +151,4 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory public void openInventory () { } -} \ No newline at end of file +}