// === BUILD PLAN ===
// Style: Hadhrami tower house (Shibam), LAYERED build: placeholder form -> mask carve -> texture
// Footprint: two conjoined masses — main tower 15x13 (x20..34, z18..30, 5 storeys, stepped
// taper 15x13 -> 13x11 -> 11x9) + attached 3-storey west wing 6x9 (x14..19, z22..30)
// + walled forecourt to the south. Composite, never a lone box.
// Height: plinth y9-10, storeys walk 11/16/21/26/31, terrace slab y35, parapet y36-38.
// Wing: walk 11/16/21, its own terrace y25 with pergola.
//
// GROUND FLOOR (top-down, 1 char = 1 block, z increases downward):
// x14 x19 x20 x34
// z18 ####W######W#####
// z22 ####A###### store SSSSS S = 5x5 U-turn stairwell (x26..30, z21..25)
// # wing # # hall SSSSS
// z26 # W D # rug SSSSS
// # # # #
// z30 ########## #####D####### D = dark oak door -> forecourt
// [forecourt wall, gate, palms]
//
// SOUTH ELEVATION (main tower):
// 38 ^ ^ ^ ^ ^ ^ crenellated white parapet
// 35 =============== terrace + white cornice
// 31 | [] [] [] | S5 study (11x9)
// 26 | [] [mm] [] | S4 bedrooms (11x9) mm = projecting dark-wood mashrabiya oriel
// 21 | [] [] [] | S3 majlis (13x11)
// 16 | [] [] [] | S2 kitchen (15x13)
// 11 | [] D [] | S1 hall/store (15x13)
// 9 ################# stone plinth on desert pad (padY=8)
//
// MATERIALS PLAN (applied LAST via replaceMasked over the placeholders):
// walls : replaceMasked(onlyMaterial blue_wool) with gradientPalette y10->y35
// terracotta -> packed_mud -> red_sandstone -> cut_sandstone {noise .24}
// WHY: ochre mud that bleaches upward = free ambient occlusion on a 25-block wall
// slabs : red_wool placeholder -> mud_bricks floors (kept out of the wall pass by mask)
// trim : white_concrete + quartz_block window surrounds, quartz cornice at every storey
// oriel : dark_oak_log frame + dark_oak_trapdoor lattice (mashrabiya), projecting 1 block
// plinth : cut_sandstone / chiseled_sandstone noisePalette
// Rooms: S1 hall+store, S2 kitchen/dining, S3 MAJLIS (perimeter seating, rugs, low table,
// banners), S4 bedrooms (2 beds, chests, shelves), S5 study (lecterns, bookshelves),
// wing G storeroom, wing 2 weaving room, wing roof terrace.
// STAIR PLAN: placeStairwell() 5x5 U-turn at (26,21) — one per storey, walk11->floor15,
// 16->20, 21->25, 26->30, 31->35(terrace). U-turn = flat landing guaranteed.
// === END PLAN ===
var padY = 8;
var plY = padY + 1; // 9 plinth bottom
var F = [10, 15, 20, 25, 30]; // storey floor slabs
var TER = 35; // roof terrace slab
var WING = [10, 15, 20]; // wing floor slabs
var WTER = 25; // wing terrace
var PH_W = 'blue_wool'; // placeholder: walls
var PH_S = 'red_wool'; // placeholder: floor/ceiling slabs
var PH_T = 'lime_wool'; // placeholder: trim / parapet
// storey rects (stepped taper)
var R = [
{ x1: 20, x2: 34, z1: 18, z2: 30 },
{ x1: 20, x2: 34, z1: 18, z2: 30 },
{ x1: 21, x2: 33, z1: 19, z2: 29 },
{ x1: 22, x2: 32, z1: 20, z2: 28 },
{ x1: 22, x2: 32, z1: 20, z2: 28 }
];
// ---------- 0. DESERT TERRAIN (one composed call + flat pads) ----------
var ground = terrain({
cx: 26, cz: 28, radius: 32, baseY: padY - 2, amp: 4, scale: 0.05, seed: 33, irregularity: 0.35,
surface: [{ block: 'sand', w: 58 }, { block: 'sandstone', w: 16 }, { block: 'smooth_sandstone', w: 10 }, { block: 'coarse_dirt', w: 16 }],
sub: 'sandstone', deep: 'stone', depth: 5,
pads: [{ cx: 25, cz: 25, r: 17, y: padY, falloff: 9 }, { cx: 26, cz: 40, r: 8, y: padY, falloff: 7 }]
});
// no ground may intrude into the building volume
fill(12, plY, 16, 37, 46, 34, 'air');
// ---------- 1. PLINTH ----------
var plinth = noisePalette([{ block: 'cut_sandstone', weight: 40 }, { block: 'chiseled_sandstone', weight: 12 },
{ block: 'sandstone', weight: 33 }, { block: 'smooth_sandstone', weight: 15 }], { seed: 8 });
fill(19, plY, 17, 35, F[0], 31, plinth);
fill(13, plY, 21, 19, F[0], 31, plinth);
// ---------- 2-4. DIRECT SHELLS (the placeholder+mask path lost the upper storeys) ----------
var wallMat = gradientPalette(F[0], TER, [
{ block: 'terracotta', from: 0 },
{ block: 'packed_mud', from: 0.26 },
{ block: 'red_sandstone', from: 0.58 },
{ block: 'cut_sandstone', from: 0.86 }], { noise: 0.24, seed: 6 });
var slabMat = noisePalette([{ block: 'mud_bricks', weight: 60 }, { block: 'packed_mud', weight: 40 }], { seed: 2 });
function shellD(x1, z1, x2, z2, y1, y2, mat) {
fill(x1, y1, z1, x2, y2, z1, mat);
fill(x1, y1, z2, x2, y2, z2, mat);
fill(x1, y1, z1, x1, y2, z2, mat);
fill(x2, y1, z1, x2, y2, z2, mat);
}
var i, s;
for (s = 0; s < 5; s++) {
var A = R[s];
var top = (s === 4) ? TER : F[s + 1];
fill(A.x1 + 1, F[s] + 1, A.z1 + 1, A.x2 - 1, top - 1, A.z2 - 1, 'air');
fill(A.x1, F[s], A.z1, A.x2, F[s], A.z2, slabMat);
shellD(A.x1, A.z1, A.x2, A.z2, F[s] + 1, top - 1, wallMat);
fill(A.x1, top, A.z1, A.x2, top, A.z2, slabMat);
}
for (s = 0; s < 3; s++) {
var wtop = (s === 2) ? WTER : WING[s + 1];
fill(15, WING[s] + 1, 23, 18, wtop - 1, 29, 'air');
fill(14, WING[s], 22, 19, WING[s], 30, slabMat);
shellD(14, 22, 19, 30, WING[s] + 1, wtop - 1, wallMat);
fill(14, wtop, 22, 19, wtop, 30, slabMat);
}
// ---------- 3. WINDOW / DOOR OPENINGS (plain air carves) ----------
var winSlots = [];
for (s = 0; s < 5; s++) {
var C = R[s];
var wy = F[s] + 2;
var xx, zz;
for (xx = C.x1 + 3; xx <= C.x2 - 3; xx += 4) {
if (!(s === 0 && xx >= 26 && xx <= 28)) {
fill(xx, wy, C.z2, xx, wy + 1, C.z2, 'air');
winSlots.push([xx, wy, C.z2, 'south']);
}
fill(xx, wy, C.z1, xx, wy + 1, C.z1, 'air');
winSlots.push([xx, wy, C.z1, 'north']);
}
for (zz = C.z1 + 3; zz <= C.z2 - 3; zz += 4) {
fill(C.x2, wy, zz, C.x2, wy + 1, zz, 'air');
winSlots.push([C.x2, wy, zz, 'east']);
if (!(s < 3 && zz >= 24 && zz <= 28)) {
fill(C.x1, wy, zz, C.x1, wy + 1, zz, 'air');
winSlots.push([C.x1, wy, zz, 'west']);
}
}
}
fill(14, WING[0] + 2, 25, 14, WING[0] + 3, 25, 'air'); winSlots.push([14, WING[0] + 2, 25, 'west']);
fill(14, WING[1] + 2, 27, 14, WING[1] + 3, 27, 'air'); winSlots.push([14, WING[1] + 2, 27, 'west']);
fill(16, WING[1] + 2, 30, 16, WING[1] + 3, 30, 'air'); winSlots.push([16, WING[1] + 2, 30, 'south']);
fill(27, F[0] + 1, 30, 27, F[0] + 2, 30, 'air');
fill(19, WING[0] + 1, 26, 20, WING[0] + 2, 26, 'air');
// ---------- 5. GYPSUM TRIM: window surrounds + storey cornices ----------
var wsi, W0;
for (wsi = 0; wsi < winSlots.length; wsi++) {
W0 = winSlots[wsi];
var wx = W0[0], wy2 = W0[1], wz = W0[2], face = W0[3];
if (face === 'south' || face === 'north') {
var oz = (face === 'south') ? wz + 1 : wz - 1;
fill(wx - 1, wy2 - 1, oz, wx + 1, wy2 - 1, oz, 'white_concrete');
fill(wx - 1, wy2 + 2, oz, wx + 1, wy2 + 2, oz, 'quartz_block');
pb(wx - 1, wy2, oz, 'white_concrete'); pb(wx - 1, wy2 + 1, oz, 'white_concrete');
pb(wx + 1, wy2, oz, 'white_concrete'); pb(wx + 1, wy2 + 1, oz, 'white_concrete');
ps(wx, wy2, wz, 'dark_oak_trapdoor[facing=' + (face === 'south' ? 'north' : 'south') + ',half=bottom,open=true]');
ps(wx, wy2 + 1, wz, 'brown_stained_glass_pane[north=true,south=true]');
} else {
var ox = (face === 'east') ? wx + 1 : wx - 1;
fill(ox, wy2 - 1, wz - 1, ox, wy2 - 1, wz + 1, 'white_concrete');
fill(ox, wy2 + 2, wz - 1, ox, wy2 + 2, wz + 1, 'quartz_block');
pb(ox, wy2, wz - 1, 'white_concrete'); pb(ox, wy2 + 1, wz - 1, 'white_concrete');
pb(ox, wy2, wz + 1, 'white_concrete'); pb(ox, wy2 + 1, wz + 1, 'white_concrete');
ps(wx, wy2, wz, 'dark_oak_trapdoor[facing=' + (face === 'east' ? 'west' : 'east') + ',half=bottom,open=true]');
ps(wx, wy2 + 1, wz, 'brown_stained_glass_pane[east=true,west=true]');
}
}
function cornice(x1, z1, x2, z2, y) {
fill(x1 - 1, y, z1 - 1, x2 + 1, y, z1 - 1, 'quartz_block');
fill(x1 - 1, y, z2 + 1, x2 + 1, y, z2 + 1, 'quartz_block');
fill(x1 - 1, y, z1 - 1, x1 - 1, y, z2 + 1, 'quartz_block');
fill(x2 + 1, y, z1 - 1, x2 + 1, y, z2 + 1, 'quartz_block');
}
for (s = 0; s < 5; s++) cornice(R[s].x1, R[s].z1, R[s].x2, R[s].z2, (s === 4) ? TER : F[s + 1]);
cornice(14, 22, 19, 30, WTER);
cornice(14, 22, 19, 30, WING[1]);
// ---------- 6. PROJECTING MASHRABIYA ORIEL (south face, storey 4) ----------
var oy = F[3] + 1;
fill(25, oy, 29, 29, oy + 3, 29, 'dark_oak_log'); // corbel box front (1 block proud)
fill(26, oy, 29, 28, oy + 2, 29, 'air');
var oi;
for (oi = 26; oi <= 28; oi++) {
ps(oi, oy, 29, 'dark_oak_trapdoor[facing=north,half=bottom,open=true]');
ps(oi, oy + 1, 29, 'brown_stained_glass_pane[east=true,west=true]');
ps(oi, oy + 2, 29, 'dark_oak_trapdoor[facing=north,half=bottom,open=true]');
}
ps(25, oy - 1, 29, 'dark_oak_stairs[facing=west,half=top]');
ps(29, oy - 1, 29, 'dark_oak_stairs[facing=east,half=top]');
fill(26, oy - 1, 29, 28, oy - 1, 29, 'dark_oak_slab[type=top]');
fill(25, oy + 4, 29, 29, oy + 4, 29, 'dark_oak_slab[type=bottom]');
fill(26, oy, 28, 28, oy + 2, 28, 'air'); // open the oriel into the room
// ---------- 7. DOORS ----------
ps(27, F[0] + 1, 30, 'dark_oak_door[facing=south,half=lower,hinge=left]');
ps(27, F[0] + 2, 30, 'dark_oak_door[facing=south,half=upper,hinge=left]');
fill(26, F[0] + 1, 31, 26, F[0] + 3, 31, 'stripped_dark_oak_log');
fill(28, F[0] + 1, 31, 28, F[0] + 3, 31, 'stripped_dark_oak_log');
fill(26, F[0] + 4, 31, 28, F[0] + 4, 31, 'quartz_block');
ps(26, F[0] + 3, 31, 'lantern[hanging=false]'); ps(28, F[0] + 3, 31, 'lantern[hanging=false]');
ps(19, WING[0] + 1, 26, 'dark_oak_door[facing=east,half=lower,hinge=right]');
ps(19, WING[0] + 2, 26, 'dark_oak_door[facing=east,half=upper,hinge=right]');
// entrance steps from the forecourt up to the door
staircase(27, 35, padY + 1, F[0] + 1, 'north', { material: 'smooth_sandstone_stairs', support: 'sandstone', width: 3 });
// ---------- 8. STAIR SHAFT — 5x5 U-turn stairwell, one per storey ----------
placeStairwell(26, 21, F[0] + 1, F[1], 'dark_oak_stairs', 'dark_oak_fence', 'spruce_planks', 'south');
placeStairwell(26, 21, F[1] + 1, F[2], 'dark_oak_stairs', 'dark_oak_fence', 'spruce_planks', 'south');
placeStairwell(26, 21, F[2] + 1, F[3], 'dark_oak_stairs', 'dark_oak_fence', 'spruce_planks', 'south');
placeStairwell(26, 21, F[3] + 1, F[4], 'dark_oak_stairs', 'dark_oak_fence', 'spruce_planks', 'south');
placeStairwell(26, 21, F[4] + 1, TER, 'dark_oak_stairs', 'dark_oak_fence', 'spruce_planks', 'south');
// ---------- 9. INTERIORS ----------
var w, c;
// S1 hall + storeroom
w = F[0] + 1; c = F[1];
rug(22, w, 26, 4, 4, 'red', 'orange');
pb(21, w, 19, 'barrel'); pb(22, w, 19, 'barrel'); pb(23, w, 19, 'barrel'); pb(21, w + 1, 19, 'barrel');
pb(24, w, 19, 'hay_block'); pb(25, w, 19, 'hay_block'); pb(24, w + 1, 19, 'hay_block');
pb(33, w, 28, 'chest'); pb(33, w, 27, 'barrel'); ps(33, w, 29, 'water_cauldron[level=3]');
pb(22, w, 22, 'dark_oak_fence'); ps(22, w + 1, 22, 'dark_oak_pressure_plate');
chairStair(21, w, 22, 'dark_oak_stairs', 'east'); chairStair(23, w, 22, 'dark_oak_stairs', 'west');
pb(31, w, 19, 'crafting_table'); pb(32, w, 19, 'barrel');
ps(24, c - 1, 24, 'lantern[hanging=true]'); ps(31, c - 1, 26, 'lantern[hanging=true]');
ps(23, c - 1, 28, 'lantern[hanging=true]');
// S2 kitchen / dining
w = F[1] + 1; c = F[2];
pb(22, w, 19, 'stripped_spruce_log'); ps(22, w + 1, 19, 'spruce_stairs[facing=south,half=top]');
ps(23, w, 19, 'furnace[facing=south,lit=true]'); ps(23, w + 1, 19, 'iron_trapdoor[facing=south,half=bottom]');
pb(24, w, 19, 'stripped_spruce_log'); ps(24, w + 1, 19, 'spruce_stairs[facing=south,half=top]');
ps(25, w + 1, 19, 'water_cauldron[level=3]'); pb(25, w, 19, 'cut_sandstone');
pb(21, w, 19, 'smoker[facing=south]'); pb(21, w, 20, 'barrel');
pb(22, w, 24, 'spruce_fence'); pb(23, w, 24, 'spruce_fence');
ps(22, w + 1, 24, 'spruce_pressure_plate'); ps(23, w + 1, 24, 'spruce_pressure_plate');
chairStair(22, w, 23, 'spruce_stairs', 'south'); chairStair(23, w, 23, 'spruce_stairs', 'south');
chairStair(22, w, 25, 'spruce_stairs', 'north'); chairStair(23, w, 25, 'spruce_stairs', 'north');
rug(21, w, 27, 4, 3, 'yellow', 'brown');
pb(33, w, 20, 'barrel'); pb(33, w + 1, 20, 'barrel'); pb(32, w, 29, 'composter'); pb(33, w, 29, 'barrel');
ps(24, c - 1, 22, 'lantern[hanging=true]'); ps(31, c - 1, 27, 'lantern[hanging=true]');
// S3 MAJLIS — the reception room, perimeter seating + rugs
w = F[2] + 1; c = F[3];
var m;
for (m = 23; m <= 31; m++) {
chairStair(m, w, 20, 'dark_oak_stairs', 'south');
if (m < 25 || m > 27) chairStair(m, w, 28, 'dark_oak_stairs', 'north');
}
for (m = 22; m <= 26; m++) chairStair(22, w, m, 'dark_oak_stairs', 'east');
rug(24, w, 22, 6, 5, 'red', 'orange');
pb(26, w, 24, 'dark_oak_fence'); pb(27, w, 24, 'dark_oak_fence');
ps(26, w + 1, 24, 'dark_oak_pressure_plate'); ps(27, w + 1, 24, 'dark_oak_pressure_plate');
pb(26, w + 1, 25, 'flower_pot');
ps(23, w + 2, 19, 'red_wall_banner[facing=south]'); ps(31, w + 2, 19, 'red_wall_banner[facing=south]');
pb(32, w, 27, 'flower_pot'); pb(22, w, 28, 'flower_pot');
ps(24, c - 1, 24, 'lantern[hanging=true]'); ps(30, c - 1, 24, 'lantern[hanging=true]');
ps(27, c - 1, 27, 'lantern[hanging=true]');
// S4 bedrooms (+ the oriel window seat)
w = F[3] + 1; c = F[4];
placeBed(23, w, 22, 'red', 'north'); placeBed(25, w, 22, 'blue', 'north');
pb(22, w, 22, 'dark_oak_fence'); ps(22, w + 1, 22, 'dark_oak_pressure_plate'); ps(22, w + 2, 22, 'lantern[hanging=false]');
pb(24, w, 21, 'chest');
shelfWall(30, w, 22, 'south', 4, 2);
placeBed(31, w, 27, 'green', 'west');
rug(25, w, 26, 4, 3, 'brown', 'orange');
chairStair(26, w, 27, 'dark_oak_stairs', 'south'); chairStair(28, w, 27, 'dark_oak_stairs', 'south');
ps(29, w, 21, 'lectern[facing=west]');
ps(25, c - 1, 25, 'lantern[hanging=true]'); ps(30, c - 1, 25, 'lantern[hanging=true]');
// S5 study / library
w = F[4] + 1; c = TER;
shelfWall(23, w, 21, 'east', 6, 2);
shelfWall(23, w, 27, 'east', 6, 2);
ps(26, w, 24, 'lectern[facing=south]');
chairStair(26, w, 25, 'dark_oak_stairs', 'north');
rug(23, w, 23, 4, 4, 'orange', 'red');
pb(31, w, 22, 'barrel'); pb(31, w, 26, 'chest'); pb(31, w, 24, 'loom[facing=west]');
pb(24, w, 25, 'flower_pot');
ps(25, c - 1, 24, 'lantern[hanging=true]'); ps(29, c - 1, 26, 'lantern[hanging=true]');
// wing interiors
w = WING[0] + 1; c = WING[1];
pb(15, w, 23, 'barrel'); pb(16, w, 23, 'barrel'); pb(15, w + 1, 23, 'barrel');
pb(17, w, 23, 'hay_block'); pb(18, w, 23, 'hay_block');
ps(15, w, 29, 'water_cauldron[level=3]'); pb(16, w, 29, 'chest');
rug(16, w, 26, 2, 2, 'brown', 'orange');
ps(16, c - 1, 26, 'lantern[hanging=true]');
w = WING[1] + 1; c = WING[2];
pb(15, w, 24, 'loom[facing=east]'); pb(15, w, 26, 'barrel');
chairStair(17, w, 26, 'spruce_stairs', 'west');
pb(16, w, 26, 'spruce_fence'); ps(16, w + 1, 26, 'spruce_pressure_plate');
rug(16, w, 28, 3, 2, 'red', 'orange');
ps(17, c - 1, 26, 'lantern[hanging=true]');
// ---------- 10. ROOF TERRACES + CRENELLATED PARAPETS ----------
fill(R[4].x1, TER, R[4].z1, R[4].x2, TER, R[4].z2, 'smooth_sandstone');
fill(26, TER, 21, 30, TER, 25, 'air'); // stairwell arrival hole
fill(26, TER, 21, 30, TER, 21, 'smooth_sandstone');
var px, pz;
function parapet(x1, z1, x2, z2, y) {
fill(x1, y, z1, x2, y, z1, 'white_concrete'); fill(x1, y, z2, x2, y, z2, 'white_concrete');
fill(x1, y, z1, x1, y, z2, 'white_concrete'); fill(x2, y, z1, x2, y, z2, 'white_concrete');
var q;
for (q = x1; q <= x2; q += 2) { pb(q, y + 1, z1, 'quartz_block'); pb(q, y + 1, z2, 'quartz_block'); }
for (q = z1; q <= z2; q += 2) { pb(x1, y + 1, q, 'quartz_block'); pb(x2, y + 1, q, 'quartz_block'); }
for (q = x1; q <= x2; q += 2) { pb(q, y + 2, z1, 'quartz_slab[type=bottom]'); pb(q, y + 2, z2, 'quartz_slab[type=bottom]'); }
}
parapet(R[4].x1, R[4].z1, R[4].x2, R[4].z2, TER + 1);
fill(14, WTER, 22, 19, WTER, 30, 'smooth_sandstone');
parapet(14, 22, 19, 30, WTER + 1);
// shaded pergola + planting on the main terrace
pb(23, TER + 1, 27, 'dark_oak_fence'); pb(23, TER + 2, 27, 'dark_oak_fence');
pb(26, TER + 1, 27, 'dark_oak_fence'); pb(26, TER + 2, 27, 'dark_oak_fence');
pb(23, TER + 1, 24, 'dark_oak_fence'); pb(23, TER + 2, 24, 'dark_oak_fence');
pb(26, TER + 1, 24, 'dark_oak_fence'); pb(26, TER + 2, 24, 'dark_oak_fence');
fill(23, TER + 3, 24, 26, TER + 3, 27, 'jungle_leaves');
rug(24, TER + 1, 25, 2, 2, 'red', 'orange');
ps(25, TER + 2, 26, 'lantern[hanging=true]');
pb(31, TER + 1, 22, 'flower_pot'); pb(31, TER + 1, 27, 'flower_pot'); pb(23, TER + 1, 22, 'flower_pot');
// stair hood over the terrace opening
fill(28, TER + 1, 22, 30, TER + 3, 22, 'mud_bricks');
fill(28, TER + 1, 26, 30, TER + 3, 26, 'mud_bricks');
fill(30, TER + 1, 23, 30, TER + 3, 25, 'mud_bricks');
var hz;
for (hz = 22; hz <= 26; hz++) {
roofStair(28, TER + 4, hz, 'smooth_sandstone_stairs', 'west');
roofStair(30, TER + 4, hz, 'smooth_sandstone_stairs', 'east');
pb(29, TER + 4, hz, 'smooth_sandstone');
}
// wing terrace: awning + seating
pb(15, WTER + 1, 24, 'dark_oak_fence'); pb(18, WTER + 1, 24, 'dark_oak_fence');
pb(15, WTER + 1, 27, 'dark_oak_fence'); pb(18, WTER + 1, 27, 'dark_oak_fence');
fill(15, WTER + 2, 24, 18, WTER + 2, 27, 'jungle_leaves');
rug(16, WTER + 1, 25, 2, 2, 'yellow', 'brown');
// ---------- 11. FORECOURT, PATH, PALMS, LIGHTING ----------
var i2;
for (i2 = 32; i2 <= 44; i2++) fill(26, padY, i2, 28, padY, i2, i2 % 4 === 0 ? 'smooth_sandstone' : 'sandstone');
fill(18, padY + 1, 38, 36, padY + 2, 38, 'mud_bricks'); // forecourt wall
fill(18, padY + 1, 32, 18, padY + 2, 38, 'mud_bricks');
fill(36, padY + 1, 32, 36, padY + 2, 38, 'mud_bricks');
fill(18, padY + 3, 32, 18, padY + 3, 38, 'mud_brick_slab[type=bottom]');
fill(36, padY + 3, 32, 36, padY + 3, 38, 'mud_brick_slab[type=bottom]');
fill(19, padY + 3, 38, 35, padY + 3, 38, 'mud_brick_slab[type=bottom]');
fill(26, padY + 1, 38, 28, padY + 3, 38, 'air'); // gate
pb(25, padY + 3, 38, 'quartz_block'); pb(29, padY + 3, 38, 'quartz_block');
lampPost(24, padY + 1, 36, 3, 'dark_oak_fence');
lampPost(30, padY + 1, 36, 3, 'dark_oak_fence');
lampPost(12, padY + 1, 26, 3, 'dark_oak_fence');
function palmTree(x, y, z, hh) {
var k;
for (k = 0; k < hh; k++) pb(x, y + k, z, k % 3 === 1 ? 'stripped_jungle_log' : 'jungle_log');
pb(x, y + hh, z, 'jungle_leaves');
var d = [[1, 0], [-1, 0], [0, 1], [0, -1], [1, 1], [-1, -1], [1, -1], [-1, 1]];
for (k = 0; k < d.length; k++) {
pb(x + d[k][0], y + hh, z + d[k][1], 'jungle_leaves');
pb(x + d[k][0] * 2, y + hh - 1, z + d[k][1] * 2, 'jungle_leaves');
}
}
palmTree(21, padY + 1, 35, 6);
palmTree(33, padY + 1, 35, 7);
palmTree(38, padY + 1, 22, 6);
palmTree(15, padY + 1, 17, 5);
// goods + water trough by the gate
pb(21, padY + 1, 33, 'hay_block'); pb(22, padY + 1, 33, 'hay_block'); pb(21, padY + 2, 33, 'hay_block');
pb(23, padY + 1, 33, 'barrel');
fill(32, padY + 1, 32, 34, padY + 1, 33, 'cut_sandstone');
fill(33, padY + 1, 33, 33, padY + 1, 33, 'water');
noisyScatter(12, padY + 1, 14, 44, padY + 1, 46, 'dead_bush', 0.02, 17);
noisyScatter(12, padY + 1, 14, 44, padY + 1, 46, 'cactus', 0.006, 23);