It is important in modding to learn how to help yourself. So in this case, it seems like you just have question about making particles generally. So have you looked at all the vanilla and open source mods that generate particles? Have you looked for any recent tutorials on particles?
Then for the dragon specifically generating the particles, have you looked at the vanilla dragon code to understand how it attacks and how the head position is tracked? Based on that can you use a forge hook like an attack event and your understanding of the dragon code to generate the particles?
When experienced modders answer questions on forums, even they often look things up. So best thing is to learn to look it up yourself? To do that, look at all the similar things you can think of and then put it together.