Fix Human movement by restoring the body rotation tick - #4301
Open
avaruus1 wants to merge 1 commit into
Open
Conversation
gabizou
approved these changes
Aug 13, 2026
The 25w02a update (ac2bbe5) adapted HumanEntity to Mojang's new tickHeadTurn(float) signature but dropped the super call in the process. Mob.tickHeadTurn is solely bodyRotationControl.clientTick(), which is the only thing that ever writes yBodyRot, so the Human's yBodyRot was frozen at its spawn value. Since LookControl clamps yHeadRot to within getMaxHeadYRot() of yBodyRot while navigating, and this override copies yHeadRot onto yRot (the vector moveRelative steers by), the movement direction was pinned to a cone around that stale angle and MoveControl's steering was overwritten every tick. Humans walked into walls, moved sideways, and oscillated between two blocks.
avaruus1
force-pushed
the
fix/human-entity-movement
branch
from
August 13, 2026 22:34
2f82320 to
28ea0b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human written part of the description:
We noticed weird movement with human entities during API-14 -> API-18 upgrade and this resolves the issue.
I also tried removing the
tickHeadTurnoverride completely, but this in turn caused the human head <-> body rotation to desync. (the yaw rot of the two could differ 180°)The 25w02a update (ac2bbe5) adapted HumanEntity to Mojang's new tickHeadTurn(float) signature but dropped the super call in the process. Mob.tickHeadTurn is solely bodyRotationControl.clientTick(), which is the only thing that ever writes yBodyRot, so the Human's yBodyRot was frozen at its spawn value.
Since LookControl clamps yHeadRot to within getMaxHeadYRot() of yBodyRot while navigating, and this override copies yHeadRot onto yRot (the vector moveRelative steers by), the movement direction was pinned to a cone around that stale angle and MoveControl's steering was overwritten every tick. Humans walked into walls, moved sideways, and oscillated between two blocks.