Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dt = tonumber(arg[1]) or 12
- local ws = "minecraft:skull"
- local ss = "minecraft:soul_sand"
- local infront = turtle.place
- local function rep(f,n)
- n = n or 1
- for i=1, n do
- turtle[f]()
- end
- end
- local function placeBlock(b,f)
- f = f or infront
- local s = turtle.getSelectedSlot()
- for i=1, 16 do
- local item = turtle.getItemDetails()
- if item and item.name == b then
- f()
- return
- end
- s = (s%16)+1
- turtle.select(s)
- end
- error("block "..b.." not found")
- end
- while true do
- rep("forward",5)
- placeBlock(ss)
- rep("turnLeft")
- placeBlock(ss)
- rep("turnRight",2)
- placeBlock(ss)
- rep("turnLeft")
- rep("back")
- placeBlock(ss)
- rep("turnLeft")
- placeBlock(ws)
- rep("turnRight",2)
- placeBlock(ws)
- rep("turnLeft")
- rep("back")
- placeBlock("ws")
- rep("back",3)
- sleep(dt)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement