// Hanseatic brick warehouse on a canal
var groundY = 10;
var x1 = 32, x2 = 48, z1 = 26, z2 = 46;
// ground platform
fill(10, groundY - 3, 10, 86, groundY - 1, 60, 'stone');
fill(10, groundY, 10, 86, groundY, 60, 'grass_block');
// canal
fill(10, groundY - 3, 62, 86, groundY, 90, 'air');
fill(10, groundY - 3, 62, 86, groundY - 1, 90, 'water');
// stone quay
fill(20, groundY, 48, 70, groundY, 61, 'stone_bricks');
// mooring bollards
pb(34, groundY + 1, 59, 'oak_log');
pb(40, groundY + 1, 59, 'oak_log');
pb(46, groundY + 1, 59, 'oak_log');
// warehouse walls, four storeys
var floorY = groundY + 1;
var topY = floorY + 20;
fill(x1, floorY, z1, x2, topY, z2, 'bricks');
fill(x1 + 1, floorY + 1, z1 + 1, x2 - 1, topY, z2 - 1, 'air');
// timber floors
var f;
for (f = 1; f <= 3; f++) {
fill(x1 + 1, floorY + f * 5, z1 + 1, x2 - 1, floorY + f * 5, z2 - 1, 'oak_planks');
}
fill(x1 + 1, floorY, z1 + 1, x2 - 1, floorY, z2 - 1, 'oak_planks');
// stepped crow gable on the canal side
var gx, d, gh;
for (gx = x1; gx <= x2; gx++) {
d = Math.abs(gx - 40);
gh = topY + 8 - 2 * Math.floor(d / 2);
fill(gx, topY, z2, gx, gh, z2, 'bricks');
}
for (gx = x1; gx <= x2; gx++) {
d = Math.abs(gx - 40);
gh = topY + 8 - 2 * Math.floor(d / 2);
fill(gx, topY, z1, gx, gh, z1, 'bricks');
}
// roof
var s;
for (s = 0; s <= 8; s++) {
for (var rz = z1 + 1; rz <= z2 - 1; rz++) {
ps(x1 + s, topY + s, rz, 'stone_brick_stairs[facing=east]');
ps(x2 - s, topY + s, rz, 'stone_brick_stairs[facing=west]');
}
}
// loading hatches on the canal side
var hy;
for (hy = 0; hy < 4; hy++) {
fill(39, floorY + 1 + hy * 5, z2, 41, floorY + 2 + hy * 5, z2, 'air');
}
// windows
var wy, wz;
for (wy = 0; wy < 4; wy++) {
for (wz = z1 + 3; wz <= z2 - 3; wz += 4) {
fill(x1, floorY + 2 + wy * 5, wz, x1, floorY + 3 + wy * 5, wz, 'glass_pane');
fill(x2, floorY + 2 + wy * 5, wz, x2, floorY + 3 + wy * 5, wz, 'glass_pane');
}
}
// door
fill(39, floorY + 1, z2, 41, floorY + 2, z2, 'air');
// hoist beam
fill(40, topY + 7, z2, 40, topY + 7, z2 + 4, 'oak_log');
var ry;
for (ry = topY, ry = floorY + 14; ry <= topY + 6; ry++) {
pb(40, ry, z2 + 4, 'iron_bars');
}
// ladders between floors
var ly;
for (ly = floorY + 1; ly <= topY - 1; ly++) {
ps(x1 + 1, ly, z1 + 2, 'ladder[facing=east]');
}
// interior crates and barrels
var lvl, i;
for (lvl = 0; lvl < 4; lvl++) {
var by = floorY + 1 + lvl * 5;
for (i = 0; i < 6; i++) {
pb(x1 + 3 + i * 2, by, z1 + 3, 'barrel');
pb(x2 - 3 - i, by, z2 - 4, 'barrel');
}
pb(x1 + 4, by, z2 - 6, 'chest');
pb(x1 + 5, by, z2 - 6, 'chest');
pb(40, by + 3, 40, 'lantern');
}
// a few crates on the quay
pb(36, groundY + 1, 52, 'barrel');
pb(37, groundY + 1, 52, 'barrel');
pb(44, groundY + 1, 54, 'barrel');