Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function back()
- if checkIfBack() == true then
- -- turtle.turnLeft() -- this makes it turtle
- -- turtle.turnLeft() -- also this..
- local stopblock, data = turtle.inspect()
- if data.name ~= "minecraft:redstone_block" then
- if turtle.forward() == false then
- turtle.attack()
- -- else -- if we move forward == false then u want him to move? no need
- -- turtle.forward() -- 2nd forward move
- end
- return false
- else
- return true
- end
- end
- end
- function move()
- if back() == false then
- fuel = turtle.getTurtleLevel()
- if fuel < 10 then refuel() end
- if turtle.inspect() == false then
- -- turtle.forward() -- 3rd call to move forward..
- else
- count()
- turtle.dig()
- turtle.attack()
- end
- else
- print("END OF PROGRAM")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement