Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local height = 4
- local width = 9
- function forward()
- turtle.forward()
- end
- function up()
- turtle.up()
- end
- function down()
- turtle.down()
- end
- function left()
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- end
- function right()
- turtle.turnRight()
- forward()
- turtle.turnLeft()
- end
- function chop()
- turtle.dig()
- end
- function chopUp()
- turtle.digUp()
- end
- function goToFloor()
- for i = 0,height,1 do
- down()
- end
- end
- function mineRow()
- for i = 0,width,1 do
- local tree = true
- if tree then
- mineTree()
- end
- left()
- end
- end
- function goBackToStart()
- turtle.turnRight()
- for i = 0,width,1 do
- forward()
- end
- turtle.turnLeft()
- end
- function mineTree()
- for i = 0,height,1 do
- chop()
- chopUp()
- up()
- end
- for i = 0,height,1 do
- down()
- end
- end
- mineRow()
- mineTree()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement