TheKojent

tree2

Feb 5th, 2013
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. --API for digging 1x1 trees
  2. function dig()
  3.   turtle.select(1)
  4.   turtle.dig()
  5.   turtle.forward()
  6.   while turtle.compareUp() do
  7.     turtle.digUp()
  8.     turtle.up()
  9.   end
  10.   while not turtle.detectDown() do
  11.     turtle.down()
  12.   end
  13. end
  14.  
  15. function clearInv()
  16.   for i = 1,13 do
  17.     turtle.select((i+3))
  18.     turtle.drop()
  19.   end
  20. end
  21.  
  22. function restock()
  23.   if turtle.getItemCount(2) == 0 then
  24.     turtle.select(2)
  25.     turtle.suckUp()
  26.   end
  27.   if turtle.getItemCount(3) == 0 then
  28.     turtle.select(3)
  29.     turtle.suckDown()
  30.   end
  31. end
  32.  
  33. function replant()
  34.   turtle.select(2)
  35.   turtle.place()
  36.   turtle.select(3)
  37.   turtle.place()
  38. end
Advertisement
Add Comment
Please, Sign In to add comment