Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function build(map, vOffset, grassHeight)
- for x = 1, #map do
- local zMax = #map[x]
- for z = 1, zMax do
- print("z"..z)
- local h = map[x][z] - vOffset
- print("h"..h)
- if h == 0 then
- turtle.forward()
- elseif h > 0 then
- for i = 1, h do
- turtle.up()
- if i <= h-grassHeight then
- turtle.select(1)
- else
- turtle.select(2)
- end
- turtle.placeDown()
- end
- turtle.forward()
- for i = 1, h do
- turtle.down()
- end
- elseif h < 0 then
- h = -h
- for i = 1, h + grassHeight do
- turtle.digDown()
- turtle.down()
- end
- turtle.select(2)
- for i = 1, grassHeight do
- turtle.up()
- turtle.placeDown()
- end
- for i = 1, h do
- turtle.up()
- end
- turtle.forward()
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- for i = 1, zMax do
- print("i"..i)
- turtle.forward()
- end
- turtle.turnRight()
- turtle.turnRight()
- QuarryUtils.refuel()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment