Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chest = peripheral.wrap("diamond_4")
- hopper = peripheral.wrap("hopper_0")
- direction = "EAST"
- stackID = 1
- chestMax = chest.getInventorySize()
- stack = chest.getStackInSlot(1)
- while stack == nil do
- stack = chest.getStackInSlot(1)
- sleep(0.1)
- end
- while true do
- stack = chest.getStackInSlot(stackID)
- hopperStack = hopper.getStackInSlot(1)
- if stack ~= nil and hopperStack == nil then
- stackTable = chest.getStackInSlot(stackID)
- chest.pushItemIntoSlot(direction, stackID, stackTable[qty])
- stackID = stackID + 1
- if stackID > chestMax then
- stackID = 1
- end
- elseif stack == nil and hopperStack == nil then
- stackID = 1
- end
- sleep(0.1)
- end
Add Comment
Please, Sign In to add comment