Lumpy pastry cream is often caused by improper whisking or cooking at too high a temperature. When tempering the eggs, whisk continuously as you slowly pour the hot milk into the egg mixture to prevent the eggs from curdling. Additionally, while cooking the custard, keep the heat at medium and whisk constantly to ensure even thickening. If lumps still form, you can strain the cream through a fine-mesh sieve to smooth it out.