The bug
When shooting normal arrows at endermen they will not get hit and they will teleport away. When shooting them with a spectral arrow they do the same but they will be marked with the spectral effect even though the arrow doesn't hit them. This also applies to the arrow of invisibility (and probably all other new arrows).
Shulker bullet / blaze(dispenser) fire charge also apply effect / fire to endermen.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 27
relates to 6
Attachments
Comments 42


I can reproduce this.

It is with all of the arrow effects, I tested it!

Confirmed.

why is my bug marked as a duplicate of this, even though i reported it earlier then this?

Confirmed for 1.13-pre3

Confirmed for 1.13-pre5

Confirmed for 19w39a and 1.14.4

Still in 19w45a

Also in BE, see — MCPE-156656
Endermen got hit by Arrow of Invisibility