Advertisement
mrjoecool

lumbercontroller

Aug 6th, 2022 (edited)
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | Source Code | 0 0
  1. local saplings = {}
  2. saplings["minecraft:oak_sapling"] = true
  3. saplings["minecraft:spruce_sapling"] = true
  4. saplings["minecraft:birch_sapling"] = true
  5. saplings["minecraft:jungle_sapling"] = true
  6. saplings["minecraft:acacia_sapling"] = true
  7. saplings["minecraft:dark_oak_sapling"] = true
  8.  
  9. local top = peripheral.wrap("top")
  10. local front = peripheral.wrap("front")
  11. local sizeTop = top.size()
  12. local sizeFront = front.size()
  13. print("")
  14. print(sizeTop)
  15. print(sizeFront)
  16.  
  17. while true do
  18.     for i=1,sizeTop do
  19.         print(i)
  20.         local item = top.getItemDetail(i)
  21.         if item then
  22.             print(item.name)
  23.             if saplings[item.name] then
  24.                 top.pushItems(peripheral.getName(front), i)
  25.             end
  26.         end
  27.     end
  28.     local slp = 30
  29.     print("sleeping for "..slp.." seconds")
  30.     sleep(slp)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement