diff --git a/localchest.lua b/localchest.lua index 49c83f0..01b5d68 100644 --- a/localchest.lua +++ b/localchest.lua @@ -74,6 +74,9 @@ function prototype:moveItemsTo(count, fromSlot, otherChest, toSlot) local tx = self.peripheral.pushItems(peripheral.getName(otherChest.peripheral), fromSlot, count, toSlot) myStack.count = myStack.count - tx + if myStack.count == 0 then + self.slots[fromSlot] = nil + end targetStack.count = targetStack.count + tx return tx