[PR #1689] [MERGED] Slow Falling clears the fall distance so landing does not hurt #3689

Closed
opened 2026-11-03 04:11:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1689
Author: @rdbtCVS
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: t3/d001fd2c


📝 Commits (2)

  • 6240124 Slow Falling clears the fall distance so landing does not hurt
  • 0d18ff7 Fall distance: Levitation resets it too, as LivingEntity.aiStep does

📊 Changes

1 file changed (+45 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/motion.rs (+45 -0)

📄 Description

🤖 Opened by rdbt's AI agent (opencode), not by rdbt himself.

Fixes #1322.

What changed

Slow Falling capped the gravity used on the way down, but fall_distance kept accumulating, so the landing tick still applied vanilla fall damage. MotionWorld::check_fall_damage now clears the distance while the effect is active, before the landing is processed. Both the in-frame path (move_self) and the server thread's replay of a client's move (lan_actions.rs) go through this method, so both singleplayer modes are covered.

The new test drops a player from a five-block ledge with and without the effect. With Slow Falling it asserts full health and a cleared distance; without it, the drop still damages.

Checks

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 75d70a1a7, 1 min 29 s)

Check Result
Scope ✅ 1 files, +43 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (8 s)
tests: horizon-client ✅ 1200 passed (1 min 12 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 325 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 313 more

python3 tools/parity.py fall_damage cannot run in this checkout: .local/minecraft/26.3/manifest.json is not prepared here, so CI's parity job covers it. The change is in the client-side MotionWorld; crates/horizon-world/src/fall_damage.rs is unchanged.

🤖 Generated with opencode


🔄 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/1689 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/d001fd2c` --- ### 📝 Commits (2) - [`6240124`](https://github.com/horizon-rust/horizon/commit/6240124557c9f12f2dfaba4c9cb4636919d616a9) Slow Falling clears the fall distance so landing does not hurt - [`0d18ff7`](https://github.com/horizon-rust/horizon/commit/0d18ff7ca7f563e775cc7abf13b9f9c02135851d) Fall distance: Levitation resets it too, as LivingEntity.aiStep does ### 📊 Changes **1 file changed** (+45 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/motion.rs` (+45 -0) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (opencode), not by rdbt himself. Fixes #1322. ## What changed Slow Falling capped the gravity used on the way down, but `fall_distance` kept accumulating, so the landing tick still applied vanilla fall damage. `MotionWorld::check_fall_damage` now clears the distance while the effect is active, before the landing is processed. Both the in-frame path (`move_self`) and the server thread's replay of a client's move (`lan_actions.rs`) go through this method, so both singleplayer modes are covered. The new test drops a player from a five-block ledge with and without the effect. With Slow Falling it asserts full health and a cleared distance; without it, the drop still damages. ## Checks **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 75d70a1a7, 1 min 29 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +43 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (8 s) | | tests: horizon-client | ✅ 1200 passed (1 min 12 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 325 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 313 more | `python3 tools/parity.py fall_damage` cannot run in this checkout: `.local/minecraft/26.3/manifest.json` is not prepared here, so CI's parity job covers it. The change is in the client-side `MotionWorld`; `crates/horizon-world/src/fall_damage.rs` is unchanged. 🤖 Generated with [opencode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:26 +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#3689
No description provided.