Advertisement
camarajohnny

power_hopper

Feb 6th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. local direction = "east" -- direction of the output chest
  2. local x = peripheral.wrap("top") -- wrapped chest to pull from
  3. local size = x.getInventorySize() -- size of Inventory being pulled from
  4. local data -- gets details on item
  5. local isItem = false --if this stays false for a search means the input inv is empty and wait
  6. while true do
  7. isItem = false
  8. for i = 1, size do
  9. data = x.getStackInSlot(i)
  10. if data ~= nil then
  11. x.pushItem(direction, i, 124)
  12. isItem = true
  13. end
  14. end
  15. if isItem == false then
  16. sleep(.5)
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement