Step 1
In a medium bowl, whisk together 1/3 of the cold milk and cornstarch until smooth.
Step 2
In a small saucepan, heat the remaining milk and sugar over medium heat until it begins to simmer; then remove from heat and set aside.
Step 3
Stir the egg and egg yolks into the cornstarch mixture, then gradually whisk in the hot milk. Pour the mixture back into the small saucepan and cook over medium-low heat, whisking constantly, until it thickens and coats the back of a spoon, about 3 to 5 minutes.
Step 4
Remove the custard from the heat and whisk in the butter and vanilla until smooth.
Step 5
Transfer the pastry cream into a bowl and cover it directly with plastic wrap to prevent a skin from forming. Allow it to cool before using.