Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function selectItemRow(i)
- currentSlot = 1 + ((i-1) * 4)
- turtle.select(currentSlot)
- while turtle.getItemCount(currentSlot) == 0 do
- if currentSlot + 1 == 1 + i * 4 do
- error("no items!")
- end
- currentSlot = currentSlot + 1
- turtle.select(currentSlot)
- end
- end
- function turnDir(row)
- if dir % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- end
- function nextRow(dir, row)
- turnDir(row)
- if dir == 0 then
- turtle.up()
- elseif dir == 1 then
- turtle.forward()
- elseif dir == 2 then
- turtle.up()
- turtle.forward()
- end
- turnDir(row)
- turtle.forward()
- end
- materials = {1, 2}
- offset = {0, 0, 2, 0, 2, 2, 1, 2}
- for n=0, 9 do
- currentMaterial = 1
- if n == 1 or n == 2 then
- currentMaterial = 2
- end
- for len=0, 20 do
- turtle.selectItemRow(currentMaterial)
- turtle.placeDown()
- turtle.forward()
- end
- nextRow(offset[n], n)
- end
- while not turttle.detectDown() do
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement