Summary:
In Java Edition, endermen riding a boat or a minecart do not take any damage from projectiles. This includes arrows, tridents, eggs, snowballs, wind charges, and splash potions (such as water or harming).
Currently in Java:
Arrows, eggs, and tridents pass right through the enderman.
Wind charges, snowballs, and splash potions break on the enderman but deal no damage.
This is a valid parity issue that arose after the Bedrock 1.21.60.27 Preview update (MCPE-189878- WAI). In Bedrock, endermen in boats/minecarts can no longer teleport and now properly take damage from all of these projectiles (they hit/break and deal damage).
Steps to reproduce:
Spawn an enderman and put it in a boat or a minecart.
Shoot or throw various projectiles at it.
Observed result:
The enderman takes no damage (projectiles either pass through or break harmlessly).
Expected result:
The enderman should be hit and take damage from all projectiles, matching Bedrock Edition.
https://zh.minecraft.wiki/w/%E6%9C%AB%E5%BD%B1%E4%BA%BA?variant=zh-cn#%E5%BC%B9%E5%B0%84%E7%89%A9:~:text=%E5%9C%A8Java%E7%89%88%E4%B8%AD%EF%BC%8C%E5%BD%93%E6%9C%AB%E5%BD%B1%E4%BA%BA%E5%9C%A8%E7%9F%BF%E8%BD%A6%E6%88%96%E8%88%B9%E9%87%8C%E5%B0%9D%E8%AF%95%E7%9E%AC%E7%A7%BB%E6%97%B6%EF%BC%8C%E5%AE%83%E4%BB%AC%E4%BC%9A%E5%9C%A8%E5%90%8C%E4%B8%80%E5%88%BB%E8%A2%AB%E6%8B%89%E5%9B%9E%E7%9F%BF%E8%BD%A6%E6%88%96%E8%88%B9%E3%80%82%E5%8D%B3%E4%BE%BF%E5%A6%82%E6%AD%A4%EF%BC%8C%E6%9C%AB%E5%BD%B1%E4%BA%BA%E7%9E%AC%E7%A7%BB%E5%87%BA%E7%9A%84%E7%9E%AC%E9%97%B4%E8%8B%A5%E4%BD%8D%E7%BD%AE%E6%81%B0%E5%BD%93%E4%BB%8D%E5%8F%AF%E4%BB%A5%E6%94%BB%E5%87%BB%E3%80%82 It seems like the enderman performs an invalid teleport, causing projectiles to miss... So which version is right?