Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local length = 4
- local width = 4
- local ignore = "minecraft:cobblestone"
- function digForward( )
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- end
- function cleanInv( slot )
- if turtle.getItemCount(slot) > 1 then
- local data = turtle.getItemDetail(slot)
- if data.name == ignore then
- turtle.select(slot)
- turtle.drop(turtle.getItemCount() - 1)
- end
- end
- end
- local lastTurnRigth = false
- length = length - 1
- for i=1,width do
- for i=1,length do
- digForward()
- end
- cleanInv(1)
- if lastTurnRigth == false then
- lastTurnRigth = true
- turtle.turnRight()
- digForward()
- turtle.turnRight()
- else
- if lastTurnRigth == true then
- lastTurnRigth = false
- turtle.turnLeft()
- digForward()
- turtle.turnLeft()
- end
- end
- end
- if lastTurnRigth == false then
- lastTurnRigth = true
- turtle.turnRight()
- else
- if lastTurnRigth == true then
- lastTurnRigth = false
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement