hbro

placeFence

Apr 26th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local size = 64
  2.  
  3. local index = 1
  4. turtle.select(1)
  5. local function place()
  6.   while turtle.detectUp() do
  7.     turtle.digUp()
  8.   end
  9.   turtle.digDown()
  10.   turtle.placeDown()
  11.   if turtle.getItemCount(index) == 0 then
  12.     index = index + 1
  13.     if index > 16 then index = 1 end
  14.     turtle.select(index)
  15.   end
  16. end
  17.  
  18. place()
  19. for i = 1, 4 do
  20.   for j = 1, size-1 do
  21.     while turtle.detect() do
  22.       turtle.dig()
  23.     end
  24.     turtle.forward()
  25.     place()
  26.   end
  27.   turtle.turnRight() -- Goes clockwise
  28. end
Add Comment
Please, Sign In to add comment