Skip to content

Fix yaw wraparound in movement event checks - #14262

Open
HP-network wants to merge 1 commit into
PaperMC:mainfrom
HP-network:fix/player-move-yaw-wrap
Open

HP-network wants to merge 1 commit into
PaperMC:mainfrom
HP-network:fix/player-move-yaw-wrap

Conversation

@HP-network

@HP-network HP-network commented Sep 16, 2026

Copy link
Copy Markdown

Fixes #14222

When checking whether a PlayerMoveEvent should be fired, normalize the yaw difference before taking its absolute value. A packet transition from 180 to -180 represents the same orientation, but the raw subtraction reports a 360-degree change and can repeatedly trigger a cancelled event and teleport loop.

This applies the normalized comparison in both movement-event checks.

Testing:

  • ./gradlew :paper-server:applySourcePatches --no-daemon --console=plain
  • ./gradlew :paper-server:compileJava --no-daemon --console=plain
  • Boundary regression test covering 180/-180 transitions
  • :paper-server:test reaches test compilation but is blocked by the existing PredicateChoiceMatchingTest API mismatch; the same errors occur on the unmodified baseline

@HP-network
HP-network requested a review from a team as a code owner September 16, 2026 02:05
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Packet spam due to disagreement between client and server because of number clamping

1 participant