Update src/main/programs/turtle-roomCreator.lua
This commit is contained in:
parent
ec7fc3c566
commit
ee2d0cd7d6
@ -4,12 +4,12 @@ function excavate(depth, width, height)
|
|||||||
-- Digging a layer
|
-- Digging a layer
|
||||||
for w = 1, width do
|
for w = 1, width do
|
||||||
-- Digging a row
|
-- Digging a row
|
||||||
for d = 1, depth do
|
for d = 1, depth-1 do
|
||||||
turtle.dig() -- Digging forward
|
turtle.dig() -- Digging forward
|
||||||
turtle.forward() -- Moving forward
|
turtle.forward() -- Moving forward
|
||||||
end
|
end
|
||||||
--move to start of row
|
--move to start of row
|
||||||
for d = 1, depth do
|
for d = 1, depth-1 do
|
||||||
turtle.back()
|
turtle.back()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ function excavate(depth, width, height)
|
|||||||
turtle.turnRight()
|
turtle.turnRight()
|
||||||
turtle.dig()
|
turtle.dig()
|
||||||
turtle.forward()
|
turtle.forward()
|
||||||
turte.turnLeft()
|
turtle.turnLeft()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ function excavate(depth, width, height)
|
|||||||
|
|
||||||
--go to next layer if not last layer
|
--go to next layer if not last layer
|
||||||
if h<height then
|
if h<height then
|
||||||
turte.digUp()
|
turtle.digUp()
|
||||||
turtle.up()
|
turtle.up()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user