Probable solution

This commit is contained in:
Daniel authored and GitHub committed 2017-03-20 08:16:41 +01:00
1 parent 173a441156
commit de0edc7d36
1 file changed
+7 -3
@@ -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 ()
{
}
}
}