Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turn(p)
- turtle.forward()
- if p == "b" then turtle.digDown() elseif p == "p" then turtle.placeDown() end
- turtle.forward()
- if p == "b" then turtle.digDown() elseif p == "p" then turtle.placeDown() end
- turtle.turnRight()
- end
- function selectItem(name,alt)
- local oldpos = turtle.getSelectedSlot()
- for i=1,16 do
- turtle.select(i)
- local slot = turtle.getItemDetail()
- if slot ~= nil and (slot["name"] == name or slot["name"] == alt) then
- break
- end
- end
- end
- while true do
- if turtle.getFuelLevel() < 500 then selectItem("minecraft:coal_block") turtle.refuel(64) end
- turtle.suckDown(8)
- selectItem("minecraft:log","minecraft:stone")
- turtle.forward()
- for i=1,4 do turn("p") end
- while true do
- os.sleep(1)
- local _,name = turtle.inspectDown()
- if name ~= nil and (name == "Botania:livingrock" or name == "Botania:livingwood") then
- break
- end
- end
- for i=1,4 do turn("b") end
- turtle.back()
- selectItem("Botania:livingwood","Botania:livingrock")
- turtle.dropUp(8)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement