Update src/main/programs/turtle-roomCreator.lua
This commit is contained in:
parent
4c57d200f3
commit
40ed219c10
@ -31,21 +31,26 @@ function excavate(depth, width, height)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returning to the starting point of the layer
|
-- Returning to the starting point of the layer and going up
|
||||||
if h < height then
|
if h < height then
|
||||||
-- Turning around
|
-- Returning to the starting point
|
||||||
turtle.turnLeft()
|
|
||||||
turtle.turnLeft()
|
|
||||||
-- Going up one level
|
|
||||||
for i = 1, width do
|
|
||||||
turtle.forward()
|
|
||||||
end
|
|
||||||
-- Turning to the correct direction
|
|
||||||
if h % 2 == 0 then
|
if h % 2 == 0 then
|
||||||
turtle.turnRight()
|
turtle.turnRight()
|
||||||
|
for i = 1, width - 1 do
|
||||||
|
turtle.forward()
|
||||||
|
end
|
||||||
|
turtle.turnRight()
|
||||||
else
|
else
|
||||||
turtle.turnLeft()
|
turtle.turnLeft()
|
||||||
|
for i = 1, width - 1 do
|
||||||
|
turtle.forward()
|
||||||
|
end
|
||||||
|
turtle.turnLeft()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Going up
|
||||||
|
turtle.digUp()
|
||||||
|
turtle.up()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user