Skip to content

Fix: normalize movement vector for 1.21.5+ (fixes #831)#835

Open
EIHEI2 wants to merge 1 commit intoisXander:mainfrom
EIHEI2:fix-issue-26
Open

Fix: normalize movement vector for 1.21.5+ (fixes #831)#835
EIHEI2 wants to merge 1 commit intoisXander:mainfrom
EIHEI2:fix-issue-26

Conversation

@EIHEI2
Copy link
Copy Markdown

@EIHEI2 EIHEI2 commented Apr 6, 2026

Description

This PR fixes the jittery movement issue reported in #831 for Minecraft 1.21.11.

Problem

Starting from Minecraft snapshot 25w02a (1.21.5+), the vanilla movement vector is normalized. However, Controlify was only limiting the vector length to 1 without normalizing it, causing inconsistent movement behavior, especially noticeable on multiplayer servers.

Solution

Added preprocessor directive to normalize the movement vector for versions >= 1.21.5, matching vanilla behavior. This ensures smooth, consistent movement across all directions.

Changes

  • Modified to use for 1.21.5+ targets
  • Preserves the old behavior for earlier versions to maintain compatibility

Testing

  • Fixes jittery movement on Hypixel and other multiplayer servers
  • Maintains analogue input sensitivity (not forced to full speed)
  • Diagonal movement now matches vanilla behavior

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.

1 participant