Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BlockList = {
- "minecraft:sponge",
- }
- function detectLeft()
- turtle.turnLeft()
- for i, Block in pairs(BlockList) do
- detected = turtle.detect(Block)
- if detected == true then turtle.turnRight() return true end
- end
- turtle.turnRight()
- return false
- end
- for i = 0, 20, 1 do
- if turtle.getFuelLevel() < 200 then
- turtle.refuel(1)
- print("Refueling")
- end
- print(detectLeft())
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment