public void placeObject(World w, int x, int y, int z) {
final StructurePiece temple = getTemple(w.getBiome(x, y, z));
if (temple == null) {
return;
}
final BoundingBox boundingBox = temple.getBoundingBox();
y = getAverageHeight(w, x, z, (int) boundingBox.getXSize(), (int) boundingBox.getZSize());
temple.setPosition(new Point(w, x, y, z));
temple.setRotation(Quaternionf.fromAngleDegAxis(random.nextInt(4) * 90, 0, 1, 0));
if (temple.canPlace()) {
temple.place();
}