View difference between Paste ID: p7nVXbSw and TVJehdcS
SHOW: | | - or go back to the newest paste.
1
-- 1 - obsidian
2
-- 2 - quartz
3
4
shrek={
5
      {1,1,1,1,1,1},
6
      {2,0,0,0,0,1},
7
      {2,0,0,0,0,0},
8
      {2,0,0,0,0,1},
9
      {1,1,1,1,1,1,},
10
      }
11
function buildLine (colors)
12
	for i = 1,#colors do
13
		slot = colors[i]
14
        if slot~=0 then
15
 		  turtle.select(slot)
16
   	 	  turtle.placeDown()
17
        end
18
 		turtle.forward()
19
	end
20
	turtle.turnRight()
21
	turtle.forward()
22
	turtle.turnLeft()
23
	for e = 1,#colors do
24
		turtle.back()
25
	end
26
end
27
28
function buildLayer(image)
29
    for i=1,#image do
30
         line=image[i]
31
         buildLine(line)
32
    end
33
  turtle.turnLeft()
34
 for i=1,#image do
35
    turtle.forward()
36
  end
37
  turtle.turnRight()
38
  turtle.up()
39
end
40
41
42-
buildLayer(shrek)
42+
buildLayer(shrek)