Advertisement
Guest User

milk

a guest
May 31st, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.62 KB | None | 0 0
  1. local Gold = true
  2.  
  3. while Gold do
  4. local success, blockbelow = turtle.inspectDown()
  5.  
  6. if blockbelow.name == "minecraft:stonebrick" then          -- Makes turtle move forward
  7.    turtle.forward()
  8. elseif blockbelow.name == "minecraft:redstone_block" then  -- Makes turtle turn left and move forward
  9.   turtle.turnLeft()
  10.   turtle.forward()
  11. elseif blockbelow.name == "minecraft:sandstone" then --Makes turtle farm the cows for milk
  12.   turtle.turnLeft()
  13.   turtle.place()
  14.   turtle.turnRight()
  15.   turtle.forward()
  16. elseif blockbelow.name == "minecraft:lapis_block" then -- Puts the turtle on its proper path
  17.   turtle.turnRight()
  18.   turtle.turnRight()
  19.   for n = 1, 11 do
  20.   turtle.forward()
  21.   end
  22. elseif blockbelow.name == "minecraft:gold_block" then -- Makes the turtle put away its now gained milk and then shut down
  23.   turtle.turnRight()
  24.   for n = 1, 16 do
  25.   turtle.select(n)
  26.   turtle.drop()
  27. end
  28.   turtle.turnLeft()
  29.   turtle.turnLeft()
  30.   turtle.forward()
  31.   Gold = false
  32. elseif blockbelow.name == "minecraft:diamond_block" then --Makes the turtle pick up the buckets it will use
  33.   turtle.turnRight()
  34.   turtle.suck()
  35.   turtle.turnLeft()
  36.   turtle.forward()
  37. elseif blockbelow.name == "minecraft:iron_block" then -- Makes the turtle turn right
  38. turtle.turnRight()
  39. turtle.forward()
  40. elseif blockbelow.name == "minecraft:log" then           --Makes the turtle move forward
  41. turtle.forward()
  42. elseif blockbelow.name ==  "minecraft:quartz_block" then  --Makes the turtle continue on its path
  43. turtle.forward()
  44. else
  45. turtle.turnRight()                                      -- Returns the turtle back onto its path
  46. turtle.forward()
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement