The bug
I tried to attack the ender dragon with a Sharpness sword with an impossible level of Sharpness, but due to MC-158205, she didn't take damage; however, it made enchantment particles (You will see these any time you have a successful attack with a Sharpness, Smite, or BoA item). I was baffled, so I tried with a Sharpness V sword and was able to reproduce it legitimately.
This can be reproduced in other instances as well, but this is the easiest way that I am aware of to reproduce it.
Steps to reproduce
With particles turned on all (might work with decreased also, I didn't test it)
Get a Sharpness item (doesn't matter the level, it can be a sword or an axe or any item really)
Attack the ender dragon with the sword
Wait for MC-158205 to occur (your attack fails due to the extremely buggy dragon hitbox)
--> ❌ You will see enchanted weapon particles (teal particles)
Related issues
Attachments
Comments


Can confirm in 1.17.1 Pre-release 1.

Related to MC-158205

I don't think it's that closely related. It's just a way to reproduce it..
Actually, it is a pretty integral part of it because it surprisingly does show the particles even though the ender dragon takes no damage

MC-211708 is also a similar case.

Yep, looks like this is a more generalized version of that bug.

I am unable to reproduce this bug in 1.21, can anyone else?