Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --pastebin get H6kpjMY6
- function isCobbleFront()
- if turtle.inspect() ~= "minecraft:cobblestone" then
- turtle.dig()
- end
- end
- function isCobbleUp()
- if turtle.inspectUp() ~= "minecraft:cobblestone" then
- turtle.digUp()
- end
- end
- function isCobbleDown()
- if turtle.inspectDown() ~= "minecraft:cobblestone" then
- turtle.digDown()
- end
- end
- function moveForward()
- if not turtle.detect() then
- turtle.forward()
- else turtle.dig()
- end
- end
- function checkUp()
- if not turtle.detectUp() then
- turtle.select(1)
- turtle.placeUp()
- end
- end
- function bottomSpot()
- isCobbleDown()
- if not turtle.detectDown() then
- turtle.select(1)
- turtle.placeDown()
- end
- end
- function firstLeftWall()
- turtle.turnLeft()
- --isCobbleFront()
- if not turtle.detect() then
- turtle.select(1)
- turtle.place()
- end
- end
- function secondLeftWall()
- turtle.up()
- --isCobbleUp()
- if not turtle.detect() then
- turtle.select(1)
- turtle.place()
- end
- end
- function aboutFace()
- for i = 1, 2 do
- turtle.turnLeft()
- end
- end
- function secondRightWall()
- --isCobbleFront()
- if not turtle.detect() then
- turtle.select(1)
- turtle.place()
- end
- end
- function roof()
- --isCobbleUp()
- if not turtle.detectUp() then
- turtle.select(1)
- turtle.placeUp()
- end
- end
- function firstRightWall()
- turtle.down()
- --isCobbleFront()
- if not turtle.detect() then
- turtle.select(1)
- turtle.place()
- end
- end
- print("How far would you like to go?")
- distance = io.read()
- for i = 1, distance do
- bottomSpot()
- firstLeftWall()
- secondLeftWall()
- aboutFace()
- secondRightWall()
- roof()
- firstRightWall()
- secondRightWall()
- turtle.turnLeft()
- moveForward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement