Multiple enchantment components ("minecraft:projectile_spawned", "minecraft:post_attack", "minecraft:hit_block" and "minecraft:damage" at least) don't trigger when firing a firework rocket from a crossbow with custom enchantment. The components work only when firing arrow with the crossbow.
Steps to reproduce:
Add a new custom enchantment with the components cited above (for exemple with an effect which trigger a "say Projectile Spawned" function)
Enchant a crossbow with the new enchantment
Fire an arrow with the crossbow
Fire a firework rocket with the crossbow
Expected results: The arrow and the rocket trigger the enchantment and show the message.
Observed results: The enchantment don't trigger when using firework rocket. Only work with arrows.
Files for proof: I have attached screenshots, a datapack and a world using the datapack which illustrate the issues for the different enchantment components (named: "Crossbow Damage", "Crossbow Hit Block", "Crossbow Projectile Spawned" and "Crossbow Post Attack" ingame). All of them trigger a "say" function (or add 20 damage for "Crossbow Damage") which work when using arrows but fail with rockets.
Note 1: Component "minecraft:damage" behaviour might be intended (since the damage come from the explosion and not the rocket, though it would be useful to have). The others component have no reason to not work however.
Note 2: This bug has been reported 7 month ago on a snapshot but has been set as "Resolved" which is not the case (MC-271622).
I can confirm this for 1.21.4. I was trying to help someone create an enchantment that modifies shot firework rockets, and I cannot get the enchantment to respond to anything. Which is odd, since the firework has very similar entity data to arrows