public void place() {
// Building objects
final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
final PiecePlaneBuilder plane = new PiecePlaneBuilder(this);
final PieceLayoutBuilder painter = new PieceLayoutBuilder(this);
final SimpleBlockMaterialPicker picker = new SimpleBlockMaterialPicker();
box.setPicker(picker);
plane.setPicker(picker);
// Foundations
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.SANDSTONE);
box.setMinMax(0, -4, 0, 20, 0, 20).fill();
// Pyramid
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.AIR);
plane.setMinMax(0, 0, 0, 20, 0, 20);
for (byte yy = 1; yy < 10; yy++) {
plane.offsetMinMax(1, 1, 1, -1, 1, -1);
plane.fill();
}
// Fill the land under
for (byte xx = 0; xx < 21; xx++) {
for (byte zz = 0; zz < 21; zz++) {
fillDownwards(xx, -5, zz, 50, VanillaMaterials.SANDSTONE);
}
}
// Tower bodies
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.AIR);
box.setMinMax(0, 0, 0, 4, 9, 4).fill();
box.offsetMinMax(16, 0, 0, 16, 0, 0).fill();
picker.setInnerMaterial(VanillaMaterials.SANDSTONE);
box.setMinMax(1, 10, 1, 3, 10, 3).fill();
box.offsetMinMax(16, 0, 0, 16, 0, 0).fill();
setBlockMaterial(2, 10, 0, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
setBlockMaterial(2, 10, 4, VanillaMaterials.STAIRS_SANDSTONE, (short) 3);
setBlockMaterial(0, 10, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 0);
setBlockMaterial(4, 10, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 1);
setBlockMaterial(18, 10, 0, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
setBlockMaterial(18, 10, 4, VanillaMaterials.STAIRS_SANDSTONE, (short) 3);
setBlockMaterial(16, 10, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 0);
setBlockMaterial(20, 10, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 1);
// Entry way
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.AIR);
box.setMinMax(8, 0, 0, 12, 4, 4).fill();
picker.setOuterMaterial(VanillaMaterials.AIR);
box.offsetMinMax(1, 1, 0, -1, -1, 0).fill();
setBlockMaterial(9, 1, 1, Sandstone.SMOOTH);
setBlockMaterial(9, 2, 1, Sandstone.SMOOTH);
setBlockMaterial(9, 3, 1, Sandstone.SMOOTH);
setBlockMaterial(10, 3, 1, Sandstone.SMOOTH);
setBlockMaterial(11, 3, 1, Sandstone.SMOOTH);
setBlockMaterial(11, 2, 1, Sandstone.SMOOTH);
setBlockMaterial(11, 1, 1, Sandstone.SMOOTH);
// Passage ways to the towers
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.AIR);
box.setMinMax(4, 1, 1, 8, 3, 3).fill();
picker.setOuterMaterial(VanillaMaterials.AIR);
box.offsetMinMax(0, 0, 1, 0, -1, -1).fill();
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.AIR);
box.setMinMax(12, 1, 1, 16, 3, 3).fill();
picker.setOuterMaterial(VanillaMaterials.AIR);
box.offsetMinMax(0, 0, 1, 0, -1, -1).fill();
// Second floor
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.SANDSTONE);
box.setMinMax(5, 4, 5, 15, 4, 15).fill();
picker.setOuterInnerMaterials(VanillaMaterials.AIR, VanillaMaterials.AIR);
box.offsetMinMax(4, 0, 4, -4, 0, -4).fill();
// Columns on the first floor
picker.setOuterInnerMaterials(Sandstone.SMOOTH, Sandstone.SMOOTH);
box.setMinMax(8, 1, 8, 8, 3, 8).fill();
box.offsetMinMax(4, 0, 0, 4, 0, 0).fill();
box.offsetMinMax(-4, 0, 4, -4, 0, 4).fill();
box.offsetMinMax(4, 0, 0, 4, 0, 0).fill();
// Side passage ways to the pyramid on the second floor
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.SANDSTONE);
box.setMinMax(1, 1, 5, 4, 4, 11).fill();
box.offsetMinMax(15, 0, 0, 15, 0, 0).fill();
// The door ways for the passages mentioned above
box.setMinMax(6, 7, 9, 6, 7, 11).fill();
box.offsetMinMax(8, 0, 0, 8, 0, 0).fill();
picker.setOuterInnerMaterials(Sandstone.SMOOTH, Sandstone.SMOOTH);
box.setMinMax(5, 5, 9, 5, 7, 11).fill();
box.offsetMinMax(10, 0, 0, 10, 0, 0).fill();
picker.setOuterInnerMaterials(VanillaMaterials.AIR, VanillaMaterials.AIR);
box.setMinMax(5, 5, 10, 6, 6, 10).fill();
box.offsetMinMax(9, 0, 0, 9, 0, 0).fill();
// Side entry ways to the towers on the second floor
box.setMinMax(2, 4, 4, 2, 6, 4).fill();
box.offsetMinMax(16, 0, 0, 16, 0, 0).fill();
// The staircases for the towers
setBlockMaterial(2, 4, 5, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
setBlockMaterial(2, 3, 4, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
setBlockMaterial(18, 4, 5, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
setBlockMaterial(18, 3, 4, VanillaMaterials.STAIRS_SANDSTONE, (short) 2);
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.SANDSTONE);
box.setMinMax(1, 1, 3, 2, 2, 3).fill();
box.offsetMinMax(17, 0, 0, 17, 0, 0).fill();
setBlockMaterial(1, 1, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 0);
setBlockMaterial(19, 1, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 0);
setBlockMaterial(1, 2, 2, Slab.SANDSTONE);
setBlockMaterial(19, 2, 2, Slab.SANDSTONE);
setBlockMaterial(2, 1, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 1);
setBlockMaterial(18, 1, 2, VanillaMaterials.STAIRS_SANDSTONE, (short) 0);
// Setup the spaces for the rows of columns inside
box.setMinMax(4, 3, 5, 4, 3, 17).fill();
box.offsetMinMax(12, 0, 0, 12, 0, 0).fill();
picker.setOuterInnerMaterials(VanillaMaterials.AIR, VanillaMaterials.AIR);
box.setMinMax(3, 1, 5, 4, 2, 16).fill();
box.offsetMinMax(13, 0, 0, 13, 0, 0).fill();
// Now place the columns
for (int zz = 5; zz < 18; zz += 2) {
setBlockMaterial(4, 1, zz, Sandstone.SMOOTH);
setBlockMaterial(4, 2, zz, Sandstone.DECORATIVE);
setBlockMaterial(16, 1, zz, Sandstone.SMOOTH);
setBlockMaterial(16, 2, zz, Sandstone.DECORATIVE);
}
// Apply the center cross above the loot pit, in the center of the pyramid
painter.setLayout(CENTER_CROSS).setPosition(7, 0, 7).fill();
// Apply the glyphs on the towers
painter.setLayout(TOWER).setPosition(1, 8, 0).setRotation(Quaternionf.fromAngleDegAxis(90, 1, 0, 0)).fill();
painter.offsetPosition(16, 0, 0).fill();
// Apply the glyph on the main door
painter.setLayout(DOOR).setPosition(8, 6, 0).fill();
// Dig the loot pit
picker.setOuterInnerMaterials(Sandstone.SMOOTH, Sandstone.SMOOTH);
box.setMinMax(8, -14, 8, 12, -11, 12).fill();
picker.setOuterInnerMaterials(Sandstone.DECORATIVE, Sandstone.DECORATIVE);
box.offsetMinMax(0, 4, 0, 0, 1, 0).fill();
picker.setOuterInnerMaterials(Sandstone.SMOOTH, Sandstone.SMOOTH);
box.offsetMinMax(0, 1, 0, 0, 1, 0).fill();
picker.setOuterInnerMaterials(VanillaMaterials.SANDSTONE, VanillaMaterials.SANDSTONE);
box.setMinMax(8, -8, 8, 12, -1, 12).fill();
picker.setOuterInnerMaterials(VanillaMaterials.AIR, VanillaMaterials.AIR);
box.offsetMinMax(1, -3, 1, -1, 0, -1).fill();
// It's a trap! (TNT bellow the floor and stone pressure plate in the middle)
setBlockMaterial(10, -11, 10, VanillaMaterials.STONE_PRESSURE_PLATE);
picker.setOuterInnerMaterials(VanillaMaterials.TNT, VanillaMaterials.TNT);
box.setMinMax(9, -13, 9, 11, -13, 11).fill();
// Setup the chest spaces
picker.setOuterInnerMaterials(VanillaMaterials.AIR, VanillaMaterials.AIR);
box.setMinMax(8, -11, 10, 8, -10, 10).fill();
setBlockMaterial(7, -10, 10, Sandstone.DECORATIVE);
setBlockMaterial(7, -11, 10, Sandstone.SMOOTH);
box.offsetMinMax(4, 0, 0, 4, 0, 0).fill();
setBlockMaterial(13, -10, 10, Sandstone.DECORATIVE);