Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pulse(side)
- rs.setOutput(side,true)
- sleep(0.05)
- rs.setOutput(side,false)
- sleep(0.05)
- end
- --[[
- function look()
- while true do
- local x,y = turtle.inspect()
- if x then
- if y.name == "minecraft:netherrack" then
- pulse "left"
- return
- end
- end
- end
- end
- function look2()
- while true do
- local x,y = turtle.inspect()
- if y.name~="minecraft:netherrack" then
- return
- end
- pulse "left"
- end
- end
- function mine()
- while true do
- pulse "right"
- local x,y = turtle.inspect()
- if not x or y.name=="minecraft:netherrack" then
- return
- end
- end
- end
- while true do
- look() look2() mine()
- end]]
- while true do
- local exists, data = turtle.inspect()
- if not exists then sleep(0.05)
- elseif data.name == "minecraft:netherrack" then pulse "left"
- else pulse "right" end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement