Bring the milk to a boil in a small saucepan, stirring to make sure it doesn’t burn. If you’re using the vanilla bean, split and scrape it, putting the small flecks into the milk as well as the rest of the bean. Before you whisk it into the yolk mixture, remove the bean.
In a heavy-bottomed saucepan, whisk the yolks together with the sugar and cornstarch until thick and well blended. Still whisking, drizzle in about 1/4 cup of the hot milk. Whisking all the while, slowly pour in the remainder of the milk.
Put the pan over medium heat and, whisking vigorously, contstantly and thoroughly bring the mixture to a boil. Keep at a boil, still whisking, for 1 to 2 minutes, then remove the pan from the heat.
If you didn’t use the vanilla bean, whisk in the vanilla extract now. Let sit for 5 minutes, then whisk in the bits of butter and chopped white chocolate, stirring until they are fully incorporated and the pastry cream is smooth and silky.
Scrape the cream into a bowl. Press a piece of plastic wrap against the surface of the cream to create an airtight seal and refrigerate until cold or, if you want to cool it quickly put the bowl into a larger bowl filled with ice cubes and cold water and stir the pastry cream occasionally until it is thoroughly chilled, about 20 minutes. The pastry cream can be kept, tightly covered, in the refrigerator for up to 3 days.