Advertisement
cowslaw

Auto Wheat Farm

Mar 16th, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. -- Automatic Wheat Farm BY: ZakyyyHD
  2. -- © Copyright Zak Nesler 2012 - 2013, All Rights Reserved
  3. -- Protected under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported (http://creativecommons.org/licenses/by-nc-nd/3.0/)
  4.  
  5. -- NOTICE! THIS PROGRAM IS NOT WORKING DUE TO MINECRAFT UPDATE, ADDING THE RESTRICTION THAT YOU SOMETIMES HAVE TO USE MORE THAN ONE BONE MEAL TO GROW THE PLANT. DO NOT USE!
  6.  
  7. -- Place Seeds in Slot 1.
  8. -- Place BoneMeal in Slot 2.
  9. -- Turtle will TURN AROUND to supply himself with more Bonemeal if necessary.
  10. -- Turtle will TURN RIGHT to empty his filled slots excluding slots 1 - 2.
  11. -- Functions
  12.  
  13. -- Turn Around
  14. function turnA()
  15.  turtle.turnRight()
  16.  turtle.turnRight()
  17. end
  18.  
  19. -- BoneMeal
  20. function boneM()
  21.  turtle.select(2)
  22.  turtle.place()
  23.  turtle.select(1)
  24. end
  25.  
  26. -- Place Seed
  27. function placeS()
  28.  turtle.select(1)
  29.  turtle.place()
  30. end
  31.  
  32. -- Dig Wheat
  33. function digW()
  34.  turtle.dig()
  35. end
  36.  
  37. -- Main Loop
  38.  
  39. while true do
  40.  placeS()
  41.  boneM()
  42.  if turtle.getItemCount(2) < 1 then
  43.   turtle.select(2)
  44.   turnA()
  45.   turtle.suck()
  46.   turnA()
  47.   turtle.select(1)
  48.  end
  49.  digW()
  50.  if turtle.getItemCount(16) > 0 then
  51.   turtle.turnRight()
  52.   for i = 3, 16 do
  53.    turtle.select(i)
  54.    turtle.drop()
  55.  end
  56.   turtle.turnLeft()
  57.   turtle.select(1)
  58.  end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement