Advertisement
RTS_Dmitriy

3D Matrix

Mar 1st, 2024
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. W = {
  2.      {{1, 1, 1},
  3.       {1, 0, 1},
  4.       {1, 1, 1},},
  5.  
  6.      {{1, 1, 1},
  7.       {1, 0, 1},
  8.       {1, 1, 1},
  9.       {0, 1, 0},},
  10.  
  11.      {{1, 1, 1},
  12.       {1, 0, 1},
  13.       {1, 1, 1},
  14.       {0, 1, 0},},
  15.    
  16.      {{1, 1, 1},
  17.       {2, 0, 2},
  18.       {0, 1, 0},},
  19.    
  20.      {{1, 1, 1},
  21.       {1, 0, 1},
  22.       {1, 1, 1},},
  23.    
  24.      {{1, 1, 1},
  25.       {1, 1, 1},
  26.       {1, 1, 1},},
  27.      }
  28.  
  29. z = 1
  30. y = 1
  31. x = 1, 3
  32. for z = 1,#W do
  33.   for y = 1,#W[z] do
  34.       for x = 1,#W[z][y] do
  35.         slot = W[z][y][x]
  36.         if slot ~= 0 then
  37.           turtle.select(slot)
  38.           turtle.placeDown()
  39.         end
  40.         turtle.forward()
  41.       end
  42.       for a = 1,#W[z][y] do
  43.          turtle.back()
  44.       end
  45.       turtle.turnLeft()
  46.       turtle.forward()
  47.       turtle.turnRight()
  48.   end
  49.   turtle.turnRight()
  50.   for A = 1,#W[z] do
  51.     turtle.forward()
  52.   end
  53.   turtle.turnLeft()
  54.   turtle.up()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement