[PR #6979] [CLOSED] motion: fix elytra wall crash damage calculation (fixes #6583) #7249

Closed
opened 2026-11-03 06:36:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6979
Author: @glitchsnake
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: fix/6583-elytra-damage


📝 Commits (2)

  • 69d7c4e motion: fix elytra wall crash damage calculation (fixes #6583)
  • 96390df Merge remote-tracking branch 'origin/main' into fix/6583-elytra-damage

📊 Changes

3 files changed (+105 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+9 -0)
📝 crates/horizon-client/src/motion.rs (+95 -3)
📝 crates/horizon-client/src/pose.rs (+1 -0)

📄 Description

🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally.

Fixes #6583.

What and why

In Java Edition 26.3, crashing into a wall with Elytra (LivingEntity.handleFallFlyingCollisions) calculates kinetic damage based on the difference between horizontal speed before impact and after collision (moveHorLength - newMoveHorLength) * 10 - 3. On Horizon's server thread, carry_client_movement was overriding velocity with the client's single-tick movement displacement, which when crashing into a wall is truncated to the small distance remaining to the wall. This caused wall impacts to deal almost no damage (~1 heart). We preserve the glide flight speed so kinetic wall impacts deal correct vanilla damage.

Verification

  • Unit test a_glide_into_a_wall_hurts_by_the_speed_it_lost passes.
  • cargo test -p horizon-client --lib motion passes.
  • python3 tools/check_public_tree.py passes.

🤖 Generated with Antigravity


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6979 **Author:** [@glitchsnake](https://github.com/glitchsnake) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/6583-elytra-damage` --- ### 📝 Commits (2) - [`69d7c4e`](https://github.com/horizon-rust/horizon/commit/69d7c4e41763a49135a128b4860ccc8105380afe) motion: fix elytra wall crash damage calculation (fixes #6583) - [`96390df`](https://github.com/horizon-rust/horizon/commit/96390dfa94af9dce1d61e4428a7b71862951389d) Merge remote-tracking branch 'origin/main' into fix/6583-elytra-damage ### 📊 Changes **3 files changed** (+105 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+9 -0) 📝 `crates/horizon-client/src/motion.rs` (+95 -3) 📝 `crates/horizon-client/src/pose.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally. Fixes #6583. ## What and why In Java Edition 26.3, crashing into a wall with Elytra (`LivingEntity.handleFallFlyingCollisions`) calculates kinetic damage based on the difference between horizontal speed before impact and after collision `(moveHorLength - newMoveHorLength) * 10 - 3`. On Horizon's server thread, `carry_client_movement` was overriding velocity with the client's single-tick movement displacement, which when crashing into a wall is truncated to the small distance remaining to the wall. This caused wall impacts to deal almost no damage (~1 heart). We preserve the glide flight speed so kinetic wall impacts deal correct vanilla damage. ## Verification - Unit test `a_glide_into_a_wall_hurts_by_the_speed_it_lost` passes. - `cargo test -p horizon-client --lib motion` passes. - `python3 tools/check_public_tree.py` passes. 🤖 Generated with [Antigravity](https://antigravity.google.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:36:25 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7249
No description provided.