As seen in https://clips.twitch.tv/ResoluteElatedOysterWTRuck arrows sometimes pass through mobs without harming them.
Linked issues
is duplicated by 9
relates to 7
Attachments
Comments 57
Thank you for the elaboration. Note that in the previous comment by Tango, the bug shows arrows bouncing off which may be a different bug, or just how this bug works now in modern versions.
I wanted to have a reliable way of showing the issue, and came up with
summon minecraft:arrow ~-4 ~1.85 ~ {Motion:[3,0,0],Rotation:[90,0],NoGravity:1}
most times it bounces client side but server side it misses and passes through.
Adding it to a tick function caused the problem to not present itself. Same with scheduled functions.
This seems to imply that the client will act on the position of the arrow based on when it came into existence, and not on a tick boundary (or something to that effect. I do not know any details on how minecraft syncs things or the proper terminology, so sorry about that.)
mkclone.mcfunction
$summon arrow ~ ~ ~ $(nbt)quantize.mcfunction
tag @s add quantized
data modify storage quantize_projectiles:clone nbt set from entity @s
kill @s
function quantize_projectiles:mkclone with storage quantize_projectiles:clonetick.mcfunction
execute as @e[type=arrow,tag=!quantized] at @s run function quantize_projectiles:quantizeBy quantizing the arrow creation to be on the tick I no longer see arrows that bounce and disappear. Hopefully this helps someone to figure out the actual problem and properly fix it.
The “bouncing off” phenomenon may have to do how the game handles the client-server syncing. Arrows aren’t AI authoritative entities and thus their handling is somewhat kept client side. Regardless, I don’t think it gives us more insight other than the projectile is probably phasing through server-side nonetheless.
Relates to MC-125936