[PR #2184] [MERGED] Elytra: hurt on wall hits, stop on climbables and levitation, Unbreaking wear #4080

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2184
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/elytra-glide-rules


📝 Commits (2)

  • 3353f1b Elytra: hurt on wall hits, stop on climbables and levitation, Unbreaking wear, real gravity
  • a4407a4 Elytra: Unbreaking for remote players, keep wall hit events on the server copy

📊 Changes

3 files changed (+95 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -6)
📝 crates/horizon-client/src/game/lan_actions.rs (+6 -2)
📝 crates/horizon-client/src/motion.rs (+79 -6)

📄 Description

What and why

Gliding with an elytra skipped several vanilla rules:

  • Flying into a wall did no damage. Now, on a server-side player, a horizontal collision during the glide hurts with fly_into_wall when the speed lost times 10, minus 3, is above 0, and plays the big fall sound (above 4) or the small one.
  • A glide could start while standing in a climbable block, and it kept going on a ladder or scaffolding. Now it does not start there, and a glide that reaches a climbable ends and moves like normal air travel. Vines, cave vines, twisting and weeping vines stay passable while gliding (#minecraft:can_glide_through).
  • Levitation did not stop gliding. It now blocks starting a glide and ends one in progress.
  • The wear the elytra takes while gliding ignored Unbreaking. It now goes through the same durability helper as other items.
  • The glide used a fixed 0.08 gravity. It now uses the effective gravity (gravity attribute, capped by Slow Falling while falling).

Vanilla reference

  • LivingEntity.handleFallFlyingCollisions, travelFallFlying, updateFallFlyingMovement, canGlide, getEffectiveGravity, onClimbable, updateFallFlying
  • LocalPlayer.aiStep (!onClimbable() before tryToStartFallFlying)
  • Player.tryToStartFallFlying
  • ItemStack.hurtAndBreak and EnchantmentHelper.processDurabilityChange

Self-check

cargo check -p horizon-client passes.


🔄 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/2184 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/elytra-glide-rules` --- ### 📝 Commits (2) - [`3353f1b`](https://github.com/horizon-rust/horizon/commit/3353f1b6e4cbe9e8e4ff69957252286c87e8a89a) Elytra: hurt on wall hits, stop on climbables and levitation, Unbreaking wear, real gravity - [`a4407a4`](https://github.com/horizon-rust/horizon/commit/a4407a4bccccf75769926530e6ac8bd7b981de64) Elytra: Unbreaking for remote players, keep wall hit events on the server copy ### 📊 Changes **3 files changed** (+95 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -6) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+6 -2) 📝 `crates/horizon-client/src/motion.rs` (+79 -6) </details> ### 📄 Description ## What and why Gliding with an elytra skipped several vanilla rules: - Flying into a wall did no damage. Now, on a server-side player, a horizontal collision during the glide hurts with `fly_into_wall` when the speed lost times 10, minus 3, is above 0, and plays the big fall sound (above 4) or the small one. - A glide could start while standing in a climbable block, and it kept going on a ladder or scaffolding. Now it does not start there, and a glide that reaches a climbable ends and moves like normal air travel. Vines, cave vines, twisting and weeping vines stay passable while gliding (`#minecraft:can_glide_through`). - Levitation did not stop gliding. It now blocks starting a glide and ends one in progress. - The wear the elytra takes while gliding ignored Unbreaking. It now goes through the same durability helper as other items. - The glide used a fixed 0.08 gravity. It now uses the effective gravity (gravity attribute, capped by Slow Falling while falling). ## Vanilla reference - `LivingEntity.handleFallFlyingCollisions`, `travelFallFlying`, `updateFallFlyingMovement`, `canGlide`, `getEffectiveGravity`, `onClimbable`, `updateFallFlying` - `LocalPlayer.aiStep` (`!onClimbable()` before `tryToStartFallFlying`) - `Player.tryToStartFallFlying` - `ItemStack.hurtAndBreak` and `EnchantmentHelper.processDurabilityChange` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:33 +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#4080
No description provided.