Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local printer3d = require('component').printer3d
- local tModels = {
- {1, 0, 1, 15, 1, 15},
- {1, 15, 1, 15, 16, 15},
- {1, 1, 15, 15, 15, 16}
- }
- local tColors = {
- 'wool_colored_white',
- 'wool_colored_orange',
- 'wool_colored_yellow',
- 'wool_colored_lime',
- 'wool_colored_blue',
- 'wool_colored_red'
- }
- local tBorder = {
- {
- {0,0,1,1,1,16},
- {0,0,0,15,1,1},
- {15,0,0,16,1,15},
- {16,0,15,1,1,16}
- },
- {
- {0,15,1,1,16,16},
- {0,15,0,15,16,1},
- {15,15,0,16,16,15},
- {16,15,15,1,16,16},
- },
- {
- {0,0,15,1,15,16},
- {1,0,15,16,1,16},
- {0,15,15,15,16,16},
- {15,1,15,16,16,16},
- }
- }
- for i = 1, #tModels do
- for j = 1, #tColors do
- if tColors[j] then
- printer3d.reset()
- printer3d.setLabel(i .. j)
- for k = 1, 4 do
- x1, y1, z1, x2, y2, z2 = table.unpack(tBorder[i][k])
- printer3d.addShape(x1, y1, z1, x2, y2, z2, 'obsidian')
- end
- x1, y1, z1, x2, y2, z2 = table.unpack(tModels[i])
- printer3d.addShape(x1, y1, z1, x2, y2, z2, tColors[j])
- printer3d.commit(1)
- while printer3d.status() == 'busy' do
- os.sleep(1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement