// deep sea submersible on the seabed
var x, y, z, i;
// seabed
fill(0, 0, 0, 47, 5, 63, 'stone');
fill(0, 6, 0, 47, 6, 63, 'sand');
// ---- main hull: cigar shape, yellow on top, white underneath ----
// hull runs along z from 16 to 44, centered at x=24, y=16
for (z = 16; z <= 44; z++) {
var r = 5;
if (z < 20) r = 5 - (20 - z);
if (z > 40) r = 5 - (z - 40);
if (r < 1) r = 1;
for (x = -r; x <= r; x++) {
for (y = -r; y <= r; y++) {
if (x * x + y * y <= r * r) {
if (y > 0) {
pb(24 + x, 16 + y, z, 'yellow_concrete');
} else {
pb(24 + x, 16 + y, z, 'white_concrete');
}
}
}
}
}
// ---- observation pod at the bow ----
for (x = -4; x <= 4; x++) {
for (y = -4; y <= 4; y++) {
for (z = -4; z <= 4; z++) {
if (x * x + y * y + z * z <= 16) {
pb(24 + x, 16 + y, 48 + z, 'light_gray_concrete');
}
}
}
}
// viewport
fill(22, 15, 52, 26, 17, 52, 'light_blue_stained_glass');
// ---- thrusters at the stern ----
for (i = -1; i <= 1; i += 2) {
fill(24 + i * 6 - 2, 14, 12, 24 + i * 6 + 2, 18, 15, 'gray_concrete');
fill(24 + i * 6 - 1, 15, 11, 24 + i * 6 + 1, 17, 11, 'iron_block');
fill(24 + i * 6, 16, 16, 24 + i * 6, 16, 18, 'gray_concrete');
}
// ---- conning tower ----
fill(22, 21, 26, 26, 24, 32, 'yellow_concrete');
fill(24, 25, 29, 24, 28, 29, 'iron_bars');
pb(24, 29, 29, 'redstone_lamp');
// ---- manipulator arms ----
for (i = -1; i <= 1; i += 2) {
fill(24 + i * 4, 12, 46, 24 + i * 4, 12, 50, 'orange_concrete');
fill(24 + i * 5, 11, 50, 24 + i * 5, 11, 54, 'orange_concrete');
pb(24 + i * 5, 11, 55, 'iron_block');
}
// ---- sample basket ----
fill(22, 9, 54, 26, 9, 57, 'iron_bars');
fill(22, 10, 54, 26, 10, 54, 'iron_bars');
fill(22, 10, 57, 26, 10, 57, 'iron_bars');
// ---- skids ----
fill(18, 8, 18, 18, 8, 46, 'gray_concrete');
fill(30, 8, 18, 30, 8, 46, 'gray_concrete');
for (z = 20; z <= 44; z += 6) {
fill(18, 9, z, 18, 11, z, 'gray_concrete');
fill(30, 9, z, 30, 11, z, 'gray_concrete');
}
// ---- floodlights ----
fill(20, 11, 53, 28, 11, 53, 'gray_concrete');
pb(21, 10, 53, 'sea_lantern');
pb(24, 10, 53, 'sea_lantern');
pb(27, 10, 53, 'sea_lantern');
// ---- interior ----
fill(21, 14, 22, 27, 21, 42, 'air');
fill(21, 14, 22, 27, 14, 42, 'stone');
pb(23, 15, 40, 'chest');
pb(25, 15, 40, 'barrel');
pb(24, 15, 30, 'crafting_table');
pb(22, 20, 32, 'sea_lantern');
pb(26, 20, 26, 'sea_lantern');
ps(24, 15, 41, 'oak_stairs[facing=north]');
// ---- rocks on the seabed ----
function rock(rx, rz, rr) {
var a, b, c;
for (a = -rr; a <= rr; a++) for (b = -rr; b <= rr; b++) for (c = -rr; c <= rr; c++) {
if (a * a + b * b + c * c <= rr * rr) pb(rx + a, 6 + b, rz + c, 'deepslate');
}
}
rock(8, 14, 3); rock(40, 22, 3); rock(10, 46, 3); rock(40, 50, 3);
rock(14, 58, 2); rock(34, 10, 2);
// ---- glass sponges ----
for (i = 0; i < 8; i++) {
x = 6 + (i * 5) % 36;
z = 12 + (i * 11) % 44;
pb(x, 7, z, 'bone_block');
pb(x, 8, z, 'bone_block');
pb(x, 9, z, 'sea_lantern');
}
// some sea pickles scattered
for (i = 0; i < 20; i++) {
x = 3 + (i * 7) % 42;
z = 5 + (i * 13) % 56;
pb(x, 7, z, 'sea_pickle');
}