Skip to content

Don't forward in-flight velocity updates for arrows or fireballs#685

Open
Term4 wants to merge 2 commits into
ViaVersion:masterfrom
Minestom-Libraries:master
Open

Don't forward in-flight velocity updates for arrows or fireballs#685
Term4 wants to merge 2 commits into
ViaVersion:masterfrom
Minestom-Libraries:master

Conversation

@Term4

@Term4 Term4 commented Jun 14, 2026

Copy link
Copy Markdown

1.8 tracks arrows & fireballs with sendVelocity=false — the client predicts the whole trajectory from the spawn velocity and receives no in-flight velocity updates. Modern servers track arrow velocity deltas (trackDeltas) and send periodic velocity packets, which ViaRewind forwarded unchanged. They overwrite the client's local prediction and desync its block-collision raytrace, making arrows visibly stick to / slide off block edges before snapping back. This drops in-flight velocity packets for arrows so the client predicts cleanly, matching native 1.8.

@Beaness

Beaness commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Even though this helps with desyncs I'm not sure whether its a good idea to completely drop all motion sync packets, if a plugin for example sets a new velocity after a few ticks then this wont be shown to 1.8 clients.
For example a plugin like https://dev.bukkit.org/projects/homingarrow will probably break.

A better solution might be to modify your server software to just not use sendVelocity on any versions (if that works).

@Term4

Term4 commented Jun 15, 2026

Copy link
Copy Markdown
Author

Even though this helps with desyncs I'm not sure whether its a good idea to completely drop all motion sync packets, if a plugin for example sets a new velocity after a few ticks then this wont be shown to 1.8 clients. For example a plugin like https://dev.bukkit.org/projects/homingarrow will probably break.

A better solution might be to modify your server software to just not use sendVelocity on any versions (if that works).

Ahh I see what you mean. It is possible to fix server side, and this change could cause issues with other plugins / projects, so you're right probs best to not. It could still be good to document the issue, and the fix, if there's a place to do that here.

@Term4

Term4 commented Jun 16, 2026

Copy link
Copy Markdown
Author

Even though this helps with desyncs I'm not sure whether its a good idea to completely drop all motion sync packets, if a plugin for example sets a new velocity after a few ticks then this wont be shown to 1.8 clients. For example a plugin like https://dev.bukkit.org/projects/homingarrow will probably break.

A better solution might be to modify your server software to just not use sendVelocity on any versions (if that works).

Actually i'm not so sure. It looks to me like that plugin altered the arrows initial velocity rather than updating the arrows velocity mid flight. If there were some way to distinguish between synchronization velocity and manually set velocity, would this fix be more reasonable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants