// === BUILD PLAN ===
// Style: Streamline Moderne roadside diner (1940s American)
// Footprint: rect x20..46 z18..36 with a ROUNDED SW corner (quarter circle r=8 @ 28,28)
// Height: ground walls y11..15, ceiling/roof deck y16; 2nd-storey office box x30..44 z20..32 y17..21, deck y22
// GROUND FLOOR (top-down, Z down = south):
// ####################kitchen####
// # back of house / prep line #
// # ==========counter======== #
// # o o o o o o stools # <- S at x42 z24..30 = stairs up
// / round tables booths #
// \_curve_ ARCH _booths_______#
// FRONT ELEVATION (banded):
// [ parapet + NEON "DINER" sign ]
// |cream| chrome band |cream|
// |glassblock windows ........|
// |red enamel plinth .........|
// MATERIALS PLAN:
// plinth y11 : red_concrete - WHY: signature red enamel base band
// windows y12-13: white_stained_glass on curve / glass on straights, white_terracotta piers - WHY: glass-block corner is the icon
// band y14 : iron_block IN wall + quartz_slab[top] PROJECTING 1 out - WHY: real relief, chrome speedline
// cream y15 : white_terracotta - WHY: enamel panel
// cornice y16: quartz_stairs[top] projecting - WHY: shadow line, breaks the flat box
// roof : flat deck + parapet + coping (Moderne is flat) + rooftop neon pylon for character
// floor : black/white_concrete checkerboard - WHY: diner icon
// STAIR PLAN: ground walk 11 -> office walk 17, delta 6 -> staircase(42,30,11,17,'north'), 7 cells z30..z24
// === END PLAN ===
var x1 = 20, x2 = 46, z1 = 18, z2 = 36;
var CR = 8, CX = 28, CZ = 28; // rounded SW corner
var sx1 = 30, sx2 = 44, sz1 = 20, sz2 = 32; // 2nd storey box
var padY = 9, floorY = 10, walkY = 11, ceilY = 16, walkY2 = 17, ceil2Y = 22;
function inside(x, z) {
if (x < x1 || x > x2 || z < z1 || z > z2) return false;
if (x < CX && z > CZ) {
var dx = x - CX, dz = z - CZ;
return (dx * dx + dz * dz) <= CR * CR;
}
return true;
}
function isWall(x, z) {
if (!inside(x, z)) return false;
return (!inside(x + 1, z) || !inside(x - 1, z) || !inside(x, z + 1) || !inside(x, z - 1));
}
function inS(x, z) { return x >= sx1 && x <= sx2 && z >= sz1 && z <= sz2; }
function isSWall(x, z) {
if (!inS(x, z)) return false;
return (x === sx1 || x === sx2 || z === sz1 || z === sz2);
}
// === TERRAIN (superpowers, flat pad) ===
var land = blob(36, 30, 34, { seed: 5, irregularity: 0.3 });
var h = hills({ base: padY - 1, amp: 3, scale: 0.05, seed: 3 });
var pad = flatten(h, { x0: 8, z0: 8, x1: 56, z1: 52 }, padY, 8);
var mat = patches(['grass_block', 'grass_block', 'coarse_dirt'], 0.05, 9);
surface(land, pad, mat, { sub: 'dirt', deep: 'stone', depth: 4 });
// === LOT + SIDEWALK (on top of the pad, y=floorY) ===
var gx, gz;
for (gx = 10; gx <= 54; gx++) {
for (gz = 12; gz <= 50; gz++) {
if (inside(gx, gz)) continue;
var nearB = (gx >= x1 - 3 && gx <= x2 + 3 && gz >= z1 - 3 && gz <= z2 + 3);
var inLot = (gz >= 38 && gz <= 49 && gx >= 12 && gx <= 52);
var inRoad = (gz >= 50);
if (nearB) { pb(gx, floorY, gz, 'light_gray_concrete'); }
else if (inLot) {
var stripe = ((gx - 12) % 6 === 0 && gz >= 40 && gz <= 47);
pb(gx, floorY, gz, stripe ? 'white_concrete' : 'gray_concrete');
} else if (inRoad) { pb(gx, floorY, gz, 'black_concrete'); }
}
}
// === CLEAR THE ENVELOPE ===
var cx, cz, cy;
for (cx = x1 - 1; cx <= x2 + 1; cx++) {
for (cz = z1 - 1; cz <= z2 + 1; cz++) {
if (!inside(cx, cz)) continue;
for (cy = floorY; cy <= ceil2Y + 3; cy++) pb(cx, cy, cz, 'air');
}
}
// === STRUCTURE: floor, walls, bands ===
var x, z, y;
for (x = x1; x <= x2; x++) {
for (z = z1; z <= z2; z++) {
if (!inside(x, z)) continue;
// checkerboard dining floor
pb(x, floorY, z, ((x + z) % 2 === 0) ? 'black_concrete' : 'white_concrete');
if (!isWall(x, z)) continue;
var pier = ((x * 3 + z * 5) % 4 === 0);
var curve = (x < CX && z > CZ);
for (y = walkY; y <= ceilY; y++) {
var blk;
if (y === walkY) blk = 'red_concrete';
else if (y === walkY + 1 || y === walkY + 2) {
if (pier) blk = 'white_terracotta';
else blk = curve ? 'white_stained_glass' : 'glass';
}
else if (y === walkY + 3) blk = 'iron_block';
else if (y === walkY + 4) blk = 'white_terracotta';
else blk = 'red_concrete'; // fascia at ceilY
pb(x, y, z, blk);
}
}
}
// === PROJECTING CHROME BAND + CORNICE (facade relief) ===
var DIRS = [[1, 0, 'east'], [-1, 0, 'west'], [0, 1, 'south'], [0, -1, 'north']];
for (x = x1 - 1; x <= x2 + 1; x++) {
for (z = z1 - 1; z <= z2 + 1; z++) {
if (!isWall(x, z)) continue;
var d;
for (d = 0; d < 4; d++) {
var nx = x + DIRS[d][0], nz = z + DIRS[d][1];
if (inside(nx, nz)) continue;
ps(nx, walkY + 3, nz, 'quartz_slab[type=top]'); // chrome speedline
roofStair(nx, ceilY, nz, 'quartz_stairs', DIRS[d][2], 'top'); // cornice
}
}
}
// === ENTRANCE ARCH ON THE CURVE ===
var ex, ez;
for (ex = x1; ex <= CX; ex++) {
for (ez = CZ; ez <= z2; ez++) {
if (!isWall(ex, ez)) continue;
var ddx = ex - 22.3, ddz = ez - 33.7;
if (ddx * ddx + ddz * ddz <= 3.2) {
pb(ex, walkY, ez, 'air'); pb(ex, walkY + 1, ez, 'air'); pb(ex, walkY + 2, ez, 'air');
pb(ex, walkY + 3, ez, 'iron_block');
// entry step outside
var sxo = ex - 1, szo = ez + 1;
if (!inside(sxo, szo)) ps(sxo, floorY, szo, 'quartz_slab[type=top]');
}
}
}
// === ROOF DECK / OFFICE FLOOR ===
for (x = x1; x <= x2; x++) {
for (z = z1; z <= z2; z++) {
if (!inside(x, z) || isWall(x, z)) continue;
if (inS(x, z)) pb(x, ceilY, z, 'light_gray_concrete');
else pb(x, ceilY, z, ((x + z) % 11 === 0) ? 'sea_lantern' : 'smooth_stone');
}
}
// parapet where there is no 2nd storey
for (x = x1; x <= x2; x++) {
for (z = z1; z <= z2; z++) {
if (!isWall(x, z)) continue;
pb(x, ceilY + 1, z, 'white_concrete');
ps(x, ceilY + 2, z, 'quartz_slab[type=top]');
}
}
// === 2ND STOREY (setback office box) ===
for (x = sx1; x <= sx2; x++) {
for (z = sz1; z <= sz2; z++) {
if (!isSWall(x, z)) continue;
var pier2 = ((x * 3 + z * 5) % 5 === 0);
for (y = walkY2; y <= ceil2Y; y++) {
var b2;
if (y === walkY2) b2 = 'white_terracotta';
else if (y === walkY2 + 1 || y === walkY2 + 2) b2 = pier2 ? 'white_terracotta' : 'glass';
else if (y === walkY2 + 3) b2 = 'iron_block';
else if (y === walkY2 + 4) b2 = 'white_terracotta';
else b2 = 'red_concrete';
pb(x, y, z, b2);
}
pb(x, ceil2Y + 1, z, 'white_concrete');
ps(x, ceil2Y + 2, z, 'quartz_slab[type=top]');
// cornice ring on the setback
var d2;
for (d2 = 0; d2 < 4; d2++) {
var mx = x + DIRS[d2][0], mz = z + DIRS[d2][1];
if (inS(mx, mz)) continue;
ps(mx, walkY2 + 3, mz, 'quartz_slab[type=top]');
}
}
}
for (x = sx1 + 1; x <= sx2 - 1; x++) {
for (z = sz1 + 1; z <= sz2 - 1; z++) {
pb(x, ceil2Y, z, ((x + z) % 9 === 0) ? 'sea_lantern' : 'smooth_stone');
}
}
// === ROOFTOP NEON SIGN "DINER" ===
var LET = {
D: ['110', '101', '101', '101', '110'],
I: ['111', '010', '010', '010', '111'],
N: ['101', '111', '111', '101', '101'],
E: ['111', '100', '110', '100', '111'],
R: ['110', '101', '110', '101', '101']
};
var word = 'DINER', sz = 33, sxStart = 24, topY = 23;
var li, ri, ci;
for (li = 0; li < word.length; li++) {
var g = LET[word.charAt(li)];
for (ri = 0; ri < 5; ri++) {
for (ci = 0; ci < 3; ci++) {
if (g[ri].charAt(ci) === '1') {
var px = sxStart + li * 4 + ci, py = topY - ri;
pb(px, py, sz, 'glowstone');
pb(px, py, sz + 1, 'red_concrete');
}
}
}
}
var pi;
for (pi = ceilY + 1; pi <= topY + 1; pi++) {
pb(23, pi, sz, 'polished_blackstone'); pb(43, pi, sz, 'polished_blackstone');
}
for (pi = 23; pi <= 43; pi++) {
pb(pi, topY + 1, sz, 'polished_blackstone');
pb(pi, topY - 5, sz, 'polished_blackstone');
}
// === INTERIOR: DINING ROOM ===
var i;
// long counter z=26 with chrome top and stools in front
for (i = 24; i <= 38; i++) {
pb(i, walkY, 26, 'light_gray_concrete');
ps(i, walkY + 1, 26, 'quartz_stairs[facing=south,half=top]');
}
for (i = 24; i <= 38; i += 2) {
pb(i, walkY, 27, 'polished_blackstone_wall');
ps(i, walkY + 1, 27, 'red_carpet');
}
// kitchen line behind the counter (z=23)
for (i = 24; i <= 38; i++) {
if (i % 5 === 0) ps(i, walkY, 23, 'furnace[facing=south,lit=false]');
else if (i % 5 === 2) ps(i, walkY, 23, 'smoker[facing=south]');
else pb(i, walkY, 23, 'stripped_birch_log');
if (i % 5 === 0 || i % 5 === 2) ps(i, walkY + 1, 23, 'iron_trapdoor[facing=south,half=bottom,open=false]');
else ps(i, walkY + 1, 23, 'quartz_stairs[facing=south,half=top]');
}
ps(30, walkY, 24, 'water_cauldron[level=3]');
pb(26, walkY, 19, 'barrel'); pb(27, walkY, 19, 'barrel'); pb(28, walkY, 19, 'chest');
// booths along the front windows
var bx;
for (bx = 32; bx <= 42; bx += 5) {
pb(bx, walkY, 34, 'oak_fence'); ps(bx, walkY + 1, 34, 'white_pressure_plate');
pb(bx + 1, walkY, 34, 'oak_fence'); ps(bx + 1, walkY + 1, 34, 'white_pressure_plate');
chairStair(bx, walkY, 33, 'red_concrete_stairs', 'south');
chairStair(bx + 1, walkY, 33, 'red_concrete_stairs', 'south');
chairStair(bx, walkY, 35, 'red_concrete_stairs', 'north');
chairStair(bx + 1, walkY, 35, 'red_concrete_stairs', 'north');
}
// round tables in the curved corner
var TT = [[24, 31], [25, 27], [22, 30]];
for (i = 0; i < TT.length; i++) {
pb(TT[i][0], walkY, TT[i][1], 'polished_blackstone_wall');
ps(TT[i][0], walkY + 1, TT[i][1], 'red_carpet');
chairStair(TT[i][0] + 1, walkY, TT[i][1], 'red_concrete_stairs', 'west');
chairStair(TT[i][0] - 1, walkY, TT[i][1], 'red_concrete_stairs', 'east');
}
pb(45, walkY, 20, 'jukebox'); pb(45, walkY + 1, 20, 'note_block');
// hanging lights
var LMP = [[26, 24], [34, 24], [26, 32], [34, 32], [42, 32], [24, 29]];
for (i = 0; i < LMP.length; i++) ps(LMP[i][0], ceilY - 1, LMP[i][1], 'lantern[hanging=true]');
// === STAIRS TO THE OFFICE ===
var top = staircase(42, 30, walkY, walkY2, 'north', { width: 1, material: 'birch_stairs', support: 'light_gray_concrete', rail: true });
// === OFFICE (2nd floor) ===
for (i = 33; i <= 38; i++) {
ps(i, walkY2, 23, 'light_gray_carpet');
ps(i, walkY2, 24, 'light_gray_carpet');
ps(i, walkY2, 25, 'light_gray_carpet');
}
pb(34, walkY2, 22, 'spruce_fence'); ps(34, walkY2 + 1, 22, 'spruce_slab[type=bottom]');
pb(35, walkY2, 22, 'spruce_fence'); ps(35, walkY2 + 1, 22, 'spruce_slab[type=bottom]');
ps(34, walkY2, 23, 'spruce_trapdoor[facing=north,half=bottom,open=false]');
ps(35, walkY2, 23, 'spruce_trapdoor[facing=north,half=bottom,open=false]');
chairStair(34, walkY2, 23, 'spruce_stairs', 'north');
var byy;
for (i = 32; i <= 36; i++) {
for (byy = 0; byy < 2; byy++) pb(i, walkY2 + byy, 31, ((i + byy) % 3 === 0) ? 'chiseled_bookshelf' : 'bookshelf');
}
pb(38, walkY2, 30, 'barrel'); pb(39, walkY2, 30, 'barrel'); pb(40, walkY2, 30, 'chest');
ps(32, ceil2Y - 1, 26, 'lantern[hanging=true]');
ps(38, ceil2Y - 1, 26, 'lantern[hanging=true]');
pb(41, walkY2, 22, 'flower_pot');
// --- office fit-out (was too bare) ---
var oi;
for (oi = 36; oi <= 40; oi++) { chairStair(oi, walkY2, 27, 'spruce_stairs', 'north'); }
ps(35, walkY2, 27, 'spruce_wall_sign[facing=east]');
ps(41, walkY2, 27, 'spruce_wall_sign[facing=west]');
pb(37, walkY2, 25, 'spruce_fence'); ps(37, walkY2 + 1, 25, 'light_gray_carpet');
pb(39, walkY2, 25, 'spruce_fence'); ps(39, walkY2 + 1, 25, 'light_gray_carpet');
for (oi = 31; oi <= 34; oi++) { pb(oi, walkY2, 21, 'barrel'); ps(oi, walkY2 + 1, 21, 'spruce_slab[type=bottom]'); }
pb(43, walkY2, 24, 'bookshelf'); pb(43, walkY2 + 1, 24, 'chiseled_bookshelf'); pb(43, walkY2, 25, 'bookshelf');
ps(36, walkY2, 22, 'lectern[facing=south]');
pb(40, walkY2, 31, 'flower_pot'); pb(32, walkY2, 24, 'flower_pot');
ps(33, walkY2, 29, 'light_gray_carpet'); ps(34, walkY2, 29, 'light_gray_carpet'); ps(35, walkY2, 29, 'light_gray_carpet');
ps(37, ceil2Y - 1, 24, 'lantern[hanging=true]'); ps(40, ceil2Y - 1, 28, 'lantern[hanging=true]');
// === EXTERIOR DETAIL: lamp posts, planters, road line ===
var POSTS = [[16, 40], [16, 46], [50, 40], [50, 46], [16, 22], [50, 22]];
for (i = 0; i < POSTS.length; i++) {
var lx = POSTS[i][0], lz = POSTS[i][1];
for (y = floorY + 1; y <= floorY + 4; y++) pb(lx, y, lz, 'polished_blackstone_wall');
pb(lx, floorY + 5, lz, 'sea_lantern');
ps(lx, floorY + 6, lz, 'quartz_slab[type=bottom]');
}
for (i = 12; i <= 52; i += 4) { pb(i, floorY + 1, 51, 'white_concrete'); }
var PL = [[18, 38], [22, 38], [48, 38], [44, 38]];
for (i = 0; i < PL.length; i++) {
pb(PL[i][0], floorY, PL[i][1], 'stripped_oak_log');
pb(PL[i][0], floorY + 1, PL[i][1], 'oak_leaves[persistent=true]');
}