Advertisement
Guest User

wither builder

a guest
Feb 18th, 2020
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. local dt = tonumber(arg[1]) or 12
  2.  
  3. local ws = "minecraft:skull"
  4. local ss = "minecraft:soul_sand"
  5. local infront = turtle.place
  6.  
  7.  
  8. local function rep(f,n)
  9.     n = n or 1
  10.     for i=1, n do
  11.         turtle[f]()
  12.     end
  13. end
  14.  
  15. local function placeBlock(b,f)
  16.     f = f or infront
  17.     local s = turtle.getSelectedSlot()
  18.     for i=1, 16 do
  19.         local item = turtle.getItemDetails()
  20.         if item and item.name == b then
  21.             f()
  22.             return
  23.         end
  24.         s = (s%16)+1
  25.         turtle.select(s)
  26.     end
  27.     error("block "..b.." not found")
  28. end
  29.  
  30.  
  31. while true do
  32.     rep("forward",5)
  33.     placeBlock(ss)
  34.     rep("turnLeft")
  35.     placeBlock(ss)
  36.     rep("turnRight",2)
  37.     placeBlock(ss)
  38.     rep("turnLeft")
  39.     rep("back")
  40.     placeBlock(ss)
  41.     rep("turnLeft")
  42.     placeBlock(ws)
  43.     rep("turnRight",2)
  44.     placeBlock(ws)
  45.     rep("turnLeft")
  46.     rep("back")
  47.     placeBlock("ws")
  48.     rep("back",3)
  49.  
  50.     sleep(dt)
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement