Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local currentSlot = 1
- function checkSlot()
- if (turtle.getItemCount(currentSlot) == 0)
- then
- currentSlot = currentSlot + 1
- turtle.select(currentSlot)
- end
- end
- function graniteSaysDigForward(lengthToDig)
- local index = 0
- while (index < lengthToDig)
- do
- turtle.digDown()
- checkSlot()
- turtle.placeDown()
- turtle.forward()
- index = index + 1
- end
- end
- local index2 = 0
- local lengthToDigX = 9
- local lengthToDigY = 9
- while (index2 < lengthToDigY)
- do
- graniteSaysDigForward(lengthToDigX)
- if (index2 % 2 == 0)
- then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- end
- index2 = index2 + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement