// Ethiopian rock-hewn church, Lalibela style.
// Ground = solid rock. Dig a rectangular trench, leave a cross-shaped block in the middle,
// hollow it out, cut windows and a door, put a stair down into the pit.
var groundTop = 16;
var pitFloor = 2;
// 1. bedrock
fill(0, 0, 0, 95, groundTop, 95, 'terracotta');
fill(0, groundTop, 0, 95, groundTop, 95, 'coarse_dirt');
// 2. the trench
fill(20, pitFloor + 1, 20, 76, groundTop, 76, 'air');
fill(20, pitFloor, 20, 76, pitFloor, 76, 'stone');
// 3. the monolith: a cross plan left standing in the middle
var x, y, z;
for (x = 32; x <= 64; x++) {
for (z = 32; z <= 64; z++) {
var arm1 = (z >= 40 && z <= 56);
var arm2 = (x >= 40 && x <= 56);
if (arm1 || arm2) {
fill(x, pitFloor + 1, z, x, 14, z, 'red_terracotta');
}
}
}
// 4. hollow the inside
fill(36, 4, 44, 60, 13, 52, 'air');
fill(44, 4, 36, 52, 13, 60, 'air');
fill(36, 3, 44, 60, 3, 52, 'stone_bricks');
fill(44, 3, 36, 52, 3, 60, 'stone_bricks');
// 5. flat roof with a cross on top
for (x = 32; x <= 64; x++) {
for (z = 32; z <= 64; z++) {
var a1 = (z >= 40 && z <= 56);
var a2 = (x >= 40 && x <= 56);
if (a1 || a2) pb(x, 15, z, 'red_terracotta');
}
}
for (x = 38; x <= 58; x++) pb(x, 16, 47, 'stone_bricks');
for (x = 38; x <= 58; x++) pb(x, 16, 48, 'stone_bricks');
for (z = 38; z <= 58; z++) pb(47, 16, z, 'stone_bricks');
for (z = 38; z <= 58; z++) pb(48, 16, z, 'stone_bricks');
// 6. windows: three rows of holes on each side
var row;
for (row = 0; row < 3; row++) {
y = 6 + row * 3;
for (z = 42; z <= 54; z += 4) {
fill(32, y, z, 35, y + 1, z, 'air');
fill(61, y, z, 64, y + 1, z, 'air');
}
for (x = 42; x <= 54; x += 4) {
fill(x, y, 32, x, y + 1, 35, 'air');
fill(x, y, 61, x, y + 1, 64, 'air');
}
}
// 7. door on the south side
fill(47, 4, 61, 48, 6, 64, 'air');
// 8. stair from the door down to the pit floor
for (y = 0; y < 4; y++) {
fill(46, 3 - y, 65 + y, 49, 3 - y, 65 + y, 'stone');
}
// 9. stair from the ground level down into the trench
for (y = 0; y <= 13; y++) {
fill(45, pitFloor + 1 + y, 77 + y, 50, pitFloor + 1 + y, 77 + y, 'air');
fill(45, pitFloor + y, 77 + y, 50, pitFloor + y, 77 + y, 'stone');
fill(45, pitFloor + 2 + y, 77 + y, 50, groundTop + 1, 77 + y, 'air');
}
// 10. inside: pillars, carpet, altar, candles
for (x = 40; x <= 56; x += 8) {
for (z = 40; z <= 56; z += 8) {
if (x >= 44 && x <= 52 && z >= 44 && z <= 52) continue;
fill(x, 4, z, x, 12, z, 'stone_bricks');
}
}
for (z = 40; z <= 58; z++) {
pb(47, 4, z, 'red_carpet');
pb(48, 4, z, 'red_carpet');
}
fill(45, 4, 38, 50, 5, 39, 'stone_bricks');
pb(46, 6, 38, 'candle');
pb(49, 6, 38, 'candle');
pb(47, 6, 38, 'gold_block');
pb(48, 6, 38, 'gold_block');
// lanterns
for (x = 42; x <= 54; x += 6) {
for (z = 42; z <= 54; z += 6) {
pb(x, 12, z, 'lantern');
}
}