Skip to content

Conversation

@dewgs
Copy link
Contributor

@dewgs dewgs commented Jan 7, 2026

Clamp the velocity conversion result to the valid short range to prevent overflow and invalid velocity values

Clamp the velocity conversion result to the valid short range to prevent overflow and invalid velocity values
@dewgs
Copy link
Contributor Author

dewgs commented Jan 7, 2026

I've noticed on a 1.21.11 server if you had a KB 10 enchantment and hit a pre 1.21.9 client they would go flying the opposite way that you hit them from

Unfortunately you can't get the pre-1.21.9 client to get the full velocity, but clamping it will leave the closest result

Better than the velocity value overflowing and causing weird issues

Copy link
Member

@kennytv kennytv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kennytv kennytv merged commit ab20f50 into ViaVersion:master Jan 7, 2026
1 check passed
@dewgs dewgs deleted the fix/legacy-velocity-overflow branch January 7, 2026 18:05
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