View difference between Paste ID: kaT3hniH and bfjWJnc6
SHOW: | | - or go back to the newest paste.
1
-- 0 - nothing
2
-- 1 - white clay
3
-- 2 - black clay
4
-- 3 - brown clay
5
-- 4 - red wool
6
7
--function
8
function iff (x,y,z)
9
    if a[x][y][z]==1 then 
10
    	turtle.select(1) 
11
    elseif a[x][y][z]==2 then
12
    	turtle.select(2) 
13
    elseif a[x][y][z]==3 then
14
    	turtle.select(3) 
15
    elseif a[x][y][z]==4 then 
16
    	turtle.select(4)
17
    elseif a[x][y][z]==5 then
18
    	turtle.select(5)
19
    elseif a[x][y][z]==6 then
20
    	turtle.select(6)
21-
      {0,0,0,0,0,0,0,0} ,
21+
22-
      {0,0,1,1,1,1,0,0} , 
22+
23-
      {0,0,1,1,1,1,0,0} ,
23+
24
end
25
 
26-
      {0,0,0,0,0,0,0,0} ,
26+
--vereabel
27-
      {0,1,1,1,1,1,1,0} ,
27+
--array danee
28-
      {0,1,1,1,1,1,0,0} ,
28+
29
    --1
30
    {
31-
      {0,2,0,0,0,0,0,0} , 
31+
      {0,0,1,0,1,0} ,
32-
      {1,1,1,1,1,1,1,0} , 
32+
      {0,0,0,0,0,0} , 
33-
      {0,1,1,1,1,1,0,0} ,
33+
      {0,0,1,0,1,0} ,
34
    },
35
    --2
36-
      {0,2,0,0,0,0,0,0} , 
36+
37-
      {0,0,1,1,1,1,0,0} , 
37+
      {0,0,1,0,1,0} ,
38-
      {0,0,1,3,1,1,0,0} , 
38+
      {1,0,0,0,0,0} ,
39
      {0,0,1,0,1,0} ,
40
    },
41-
      {0,0,0,0,0,0,0,0} ,
41+
    --3
42-
      {0,0,1,1,1,0,0,0} ,
42+
43-
      {0,0,0,0,0,0,0,0} ,
43+
      {0,0,1,1,1,0} , 
44
      {1,1,1,1,1,4} , 
45
      {0,0,1,1,1,0} ,
46-
      {0,0,0,0,0,0,0,0} ,
46+
47-
      {0,0,0,0,0,0,0,0} ,
47+
    --4
48-
      {0,0,0,0,0,0,0,1} ,
48+
49-
    }
49+
      {0,0,3,3,3,1} , 
50
      {0,0,3,3,1,2} , 
51
      {0,0,3,3,3,1} , 
52
    },
53
    --5
54
    {
55
      {0,0,3,3,2,0} ,
56
      {0,0,3,3,1,0} ,
57
      {0,0,3,3,2,0} ,
58
    },
59
    --5
60
    {
61
      {0,0,0,3,3,0} ,
62-
        for z = 1, #a[x][y] do      	
62+
      {0,0,0,3,3,0} ,
63
      {0,0,0,3,3,0} ,
64
    },
65
    --6
66
    { 
67
      {0,0,0,1,0,0} ,
68
      {0,0,0,0,0,0} ,
69
      {0,0,0,1,0,0} ,
70
     }
71
    --7
72
    --all of them are elemants
73
}
74
turtle.up()
75
for x = 1, #a do
76
    for y = 1, #a[x] do
77
        for z = 1, #a[x][y] do
78
            iff(x,y,z)
79
        turtle.placeDown()
80
        turtle.forward()
81
        end 
82
        turtle.turnRight()
83
        turtle.forward()
84
        turtle.turnRight()
85
        for z = 1, #a[x][y] do
86
            --elemants of the {0...} it show were it is
87
        turtle.forward()
88
        end
89
        turtle.turnRight()
90
        turtle.turnRight()
91
    end
92
    turtle.turnLeft()
93
    for y = 1, #a[x] do
94
    	turtle.forward()
95
	end
96
    turtle.turnRight()
97
    turtle.up()
98
end