Ice-Cream-Cone Cake

Ingredients:
3 cups all-purpose flour
1 tablespoon baking powder
1 1/2 teaspoons salt
3 sticks (3/4 pound) unsalted butter, softened
1 3/4 cups sugar
4 large eggs at room temperature 30 minutes
1 1/2 teaspoons pure vanilla extract
1 1/2 cups whole milk
7 flat-bottomed wafer cones
1 1/2 cups whole milk
9 large egg yolks
3/4 cup sugar
1/4 teaspoon salt
3 1/2 ounces fine-quality bittersweet chocolate (no more than 60% cacao if marked), chopped
6 sticks (1 1/2 pound) unsalted butter, softened
1 tablespoon pure vanilla extract
2 cups coarsely crushed 2-inch chocolate wafers (28 small cookies)
Equipment: 2 (8- by 2-inch) round cake pans; a small offset spatula; 2 large pastry bags each fitted with 1/3-inch star tip
1 small offset spatula
2 large pastry bags each fitted with 1/3-inch star tip

Instructions:
Preheat oven to 350°F with racks in upper and lower thirds. Butter pans. Line bottoms with parchment, then butter and lightly flour pans.
Sift together flour, baking powder, and salt into a bowl.
Beat butter with sugar using an electric mixer (paddle attachment for a stand mixer) at medium-high speed until pale and fluffy, about 5 minutes in a stand mixer or 10 with a handheld. Beat in eggs 1 at a time, then vanilla, and beat until thoroughly incorporated, about 5 minutes. Reduce speed to low and add flour mixture in 4 batches alternately with milk, beginning and ending with flour mixture and mixing until batter is just smooth.
Stand cones, open ends up, in a 12-cup muffin pan and fill cones two-thirds full with batter. Divide remaining batter between cake pans.
Bake cones in upper third of oven and cakes in lower third until a wooden pick inserted in center of cake comes out clean, 15 to 22 minutes for cones, 25 to 35 minutes for cakes. Cool cakes 5 minutes in pans on a large rack and transfer cones to another rack to cool completely. Invert cakes onto rack and cool completely.
Bring milk just to a boil in a medium saucepan. Whisk together yolks, sugar, and salt in a bowl until combined well, then add milk in a slow stream, whisking constantly. Transfer to saucepan and cook over medium-low heat, stirring constantly with a wooden spoon, until custard thickens and registers 175°F on an instant-read thermometer, 5 to 10 minutes (do not let boil). Strain through a fine-mesh sieve into a metal bowl. Refrigerate, covered, until cold, at least 1 hour.
Melt chocolate, then cool to warm.
Beat butter with cleaned beaters (whisk attachment if using stand mixer) at high speed until light and fluffy, about 2 minutes in a stand mixer or 4 with a handheld. Reduce speed to medium and gradually pour in cold custard. Add vanilla and increase speed to high, then beat until buttercream is smooth, about 2 minutes in a stand mixer or 4 with a handheld.
Transfer 1 1/4 cups buttercream to a bowl and stir in warm melted chocolate to make chocolate buttercream. Transfer about 2 cups vanilla buttercream to another bowl and fold in crushed wafers to make cookies-and-cream filling.
Halve cakes horizontally with a large serrated knife. Put 1 cake layer, cut side up, on a cake stand or plate and, using offset spatula, spread top with 1 cup cookies-and-cream buttercream. Top with another cake layer, cut side down, and spread with 1 cup cookies-and-cream buttercream. Top with another cake layer, cut side up, and spread with remaining cookies-and-cream buttercream. Top with remaining cake layer, cut side down. Spread side and top of cake with about 2 1/2 cups vanilla buttercream (total).
Spoon chocolate buttercream and remaining vanilla buttercream into separate pastry bags.
Halve each cone lengthwise with serrated knife. Attach cones (flat sides) to side of cake with tops of cones touching. (You will have an extra cone in case one gets damaged.)
Holding pastry bag filled with vanilla buttercream vertically over cake, pipe about 2 tablespoons buttercream on top of every other cone (touching top of cake) to resemble soft-serve ice cream. Pipe chocolate buttercream on top of remaining cones in same manner.