When the player shoots a projectile at a closed shulker or a breeze from a distance of 1-3 blocks away, the projectile will almost instantly be deflected at the camera's position, never getting near the entity.
Steps to Reproduce:
Summon a shulker with no AI:
/summon minecraft:shulker ~ ~ ~ {NoAI:1b}
Fire an arrow at it from 1-3 blocks away
→ observe resultFire an arrow at it from >=4.5 blocks away
→ observe result
Observed Behavior:
When firing it from a closer distance, the arrow will almost instantly be deflected at the camera position, and the player's view will be visually cluttered from all the arrow and particles created. The arrow will also not damage the player due to MC-125936 and/or MC-214546. When attempting this same issue with breezes, the behavior is less noticable comparatively (shown in the video/s)
Expected Behavior:
The arrow would get near the shulker's hitbox before being deflected properly at close distances just as it does from further away.
Screenshots/Videos:
Reproducing the issue from a third-person perspective:
[media][media]
Reproducing the issue in first person:
[media]Related issues
relates to
Attachments
Comments


Hello Jiingy!
After further revision, this seems to be an error with Minecraft's rebounding code, and being to close propels it much too fast in the wrong direction.
Hope this can help!
First appeared in 15w31a, when shulkers were added:
[media]

Possibly related to MC-271539.
This issue was fixed in 24w37a. The previous snapshot; 24w36a has buggy behavior with both arrows and tridents, and then in 24w37a both projectiles are fixed and properly deflect.
24w36a:
[media]
24w37a:
[media]