TehNoiseBomb_

ComputerCraft 1.75 - 9x9 Farming - itemDump

Apr 13th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. --@Author: Zach Combs aka TehNoiseBomb
  2. --@Version: 1.1
  3.  
  4. local inputs = {...}
  5. local seedData = ... --The data about the seed in the turtle's inventory
  6.  
  7. --Turn left
  8. --Move forward three times
  9. turtle.turnLeft()
  10. for i = 0, 2 do
  11.  turtle.forward()
  12. end
  13.  
  14. --For each slot in the turtle's inventory:
  15. -- Check if the current slot is the seed slot, if it is not:
  16. --  Select the slot
  17. --  Drop the entire slot on/into the block below the turtle
  18. for i = 1, 16 do
  19.  if i == seedData.slot then
  20.  else
  21.   turtle.select(i)
  22.   turtle.dropDown()
  23.  end
  24. end
  25.  
  26. --If the seeds are not in the first inventory slot:
  27. -- Select the seeds
  28. -- Transfer the seeds to the first slot
  29. if seedData.slot > 1 then
  30.  turtle.select(seedData.slot)
  31.  turtle.transferTo(1)
  32.  seedData.slot = 1
  33. end
  34.  
  35. --Return the seedData table (to update the main program if the seeds we transferred to the first slot)
  36. return seedData
Add Comment
Please, Sign In to add comment