Advertisement
renanmfd

obsidian

Dec 15th, 2022 (edited)
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. -- @file floorer.lua
  2. --
  3. -------------------------------------------------------------------------------
  4.  
  5. -- wget https://raw.githubusercontent.com/renanmfd/turtlesworm/master/obsidian.lua obsidian
  6.  
  7. local args = {...}
  8. local size
  9. local count = 0
  10.  
  11. if args[1] == nil then
  12.     size = 1
  13. elseif tonumber(args[1]) < 1 then
  14.     exit()
  15. else
  16.     size = tonumber(args[1])
  17. end
  18.  
  19. while true do
  20.     turtle.turnLeft()
  21.     turtle.dig()
  22.     turtle.turnRight()
  23.     turtle.turnRight()
  24.     turtle.dig()
  25.     turtle.turnLeft()
  26.     turtle.dig()
  27.     turtle.forward()
  28.    
  29.     count = count + 1
  30.     if count >= size then
  31.         break
  32.     end
  33. end
  34.  
  35. turtle.turnLeft()
  36. turtle.turnLeft()
  37. turtle.digDown()
  38. turtle.down()
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement