@Dhranios please also note that I have edited the post a lot since I first submitted it. I don't knkw how but it had been sent before I finished completing
Again, there is no invulnerability. The only invulnerability in minecraft is when you respawn/enter the world. Taking damage does not make you invulnerable, but a different rule of how the damage is received is applied.
Unfortunately the only way to replicate the bug that I could think of is this, but my intention is to report a logic bug that may lead to other problems in the future, not what the effect with a 29b amplifier can do. It's fine if mojang doesn't want to fix it, but at least I did my part
I have also seen a bug about wolves that was related to NBT (which they clearly do not support) get marked as open because it had another indirect problem, so I still have hope
Note that hurttime are NOT invulnerability frames and not just the frame count. Actually it is a set of rules
It is an extremely common mistake to think that hurttime are iframes, but they are not
EDIT: I used the term hurttime incorrectly when I should have used Damage Rules. The post has been edited to correct this
not a bug
btw, you can easily get and set the value. example command: