Advertisement
HappySunChild

sticks

Apr 10th, 2025 (edited)
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. ---@param slot number
  2. local function drop(slot)
  3.     turtle.select(slot)
  4.     turtle.dropUp(64)
  5. end
  6.  
  7. ---@param slot number
  8. local function store(slot)
  9.     turtle.select(slot)
  10.     turtle.dropDown(64)
  11. end
  12.  
  13. local function processPlanks()
  14.     turtle.select(1)
  15.     turtle.craft(64)
  16.  
  17.     for slot = 1, 4 do
  18.         store(slot)
  19.     end
  20. end
  21.  
  22. local function processLogs()
  23.     turtle.select(1)
  24.     turtle.craft(64)
  25.  
  26.     turtle.select(2)
  27.     turtle.transferTo(5)
  28.  
  29.     drop(3)
  30.     drop(4)
  31.  
  32.     processPlanks()
  33.  
  34.     turtle.select(1)
  35.     turtle.suckUp(64)
  36.     turtle.select(5)
  37.     turtle.suckUp(64)
  38.  
  39.     processPlanks()
  40. end
  41.  
  42. local function main()
  43.     print("Processing logs")
  44.  
  45.     while true do
  46.         if not turtle.suck(64) then
  47.             break
  48.         end
  49.  
  50.         processLogs()
  51.     end
  52.  
  53.     print("no more logs")
  54. end
  55.  
  56. main()
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement